Accessing OTRS on IIS via proxy - URL's are broken

Moderator: crythias

Post Reply
tpsupport
Znuny newbie
Posts: 75
Joined: 02 Feb 2011, 14:45
Znuny Version: 6.0.12

Accessing OTRS on IIS via proxy - URL's are broken

Post by tpsupport »

Hello community,

We just upgraded OTRS to from 3.1.15 which ran on Apache to 3.2.12 and now on IIS. Thanks to the Windows Installer for OTRS everything worked perfectly and Updates are not a nightmare anymore. We are still on Windows Server 2008 R2.
Our customers and agents are connecting via a proxy that is redirecting them to the server, eg. support.domain.com is directing to otrs.domain.com. That way they do not have to remember the machine name and the system can be reached from outside the company network. This worked great with Apache but not anymore with IIS.
The URL's seem to be encoded but OTRS needs them decoded to find the modules. I am not sure if IIS is doing this and it is just maybe a configuration.

proxy (wrong)
otrs02 (correct)
That way OTRS can't find the module because it looks for "CustomerTicketOverview%3bSubaction.pm" as the semicolon ";" is missing. Decoding "%3b" would show as semicolon ";".

OTRS error:
Message: Module Kernel/Modules/CustomerTicketOverviewSubactionMyTickets.pm not found/could not be loaded! RemoteAddress: 192.168.10.100 RequestURI: /otrs/customer.pl?Action=CustomerTicketOverview%3bSubaction=MyTickets


Does anyone have an idea what maybe could cause this?

Thanks!


-Rick
Znuny 6.5 LTS - Ubuntu 20.04 x64, Azure Database for MySQL server 5.7, Perl 5.22.1, Apache/2.4.18
tpsupport
Znuny newbie
Posts: 75
Joined: 02 Feb 2011, 14:45
Znuny Version: 6.0.12

Re: Accessing OTRS on IIS via proxy - URL's are broken

Post by tpsupport »

I found out that Apache apparently is encoding the semicolon but don't see why this happens. Apache is configured to redirect Http requests to Https and when this happens IIS will get the wrong url.
When Looking into the network stack I can see the following:

Code: Select all

[Request]
GET http://support.domain.com/otrs/customer.pl?Action=CustomerTicketOverview;Subaction=MyTickets
302 Found

GET /otrs/customer.pl?Action=CustomerTicketOverview;Subaction=MyTickets HTTP/1.1
User-Agent: Opera/9.80 (Windows NT 6.1; WOW64) Presto/2.12.388 Version/12.16

[Response]
HTTP/1.1 302 Found
Date: Wed, 18 Dec 2013 17:49:57 GMT
Server: Apache/2.2.16 (Debian)
Location: https://support.domain.com/otrs/customer.pl?Action=CustomerTicketOverview%3bSubaction=MyTickets

I have now tried several things like Rewrite Url for IIS or setting "nocanon" behind ProxyPass value for Apache but nothing changed. We need people to work from outside OTRS so I will need to revert to Apache again unfortunately.
Znuny 6.5 LTS - Ubuntu 20.04 x64, Azure Database for MySQL server 5.7, Perl 5.22.1, Apache/2.4.18
tpsupport
Znuny newbie
Posts: 75
Joined: 02 Feb 2011, 14:45
Znuny Version: 6.0.12

Re: Accessing OTRS on IIS via proxy - URL's are broken

Post by tpsupport »

We could finally fix this issue by using a rewrite rule in the Apache proxy config instead of proxypass. This way we could tell apache with a parameter to not encode.

See also: http://stackoverflow.com/questions/6520 ... any-way-to

Hope this helps someone.
Znuny 6.5 LTS - Ubuntu 20.04 x64, Azure Database for MySQL server 5.7, Perl 5.22.1, Apache/2.4.18
Post Reply