OTRS+Apache behind Nginx, how to config OTRS base URL?

Moderator: crythias

Locked
betawarz
Znuny newbie
Posts: 3
Joined: 30 Apr 2013, 18:19
Znuny Version: 3.2.5

OTRS+Apache behind Nginx, how to config OTRS base URL?

Post by betawarz »

Hi all,

We run OTRS+Apache internally on a dedicated Ubuntu server. I have configured Apache to serve up OTRS on port 8080, at a base URL of /. I configured it to not need the base /otrs URL. I still use the /otrs-web/ for the CSS, etc. This configuration is working just fine.

But, we also run several other web apps, on different machines, and we're trying to unify them, behind a common domain name, using Nginx.

So, step one was to try to get Nginx properly proxying to the Apache server that is hosting OTRS. I've got this up and running, proxying just fine. On the Nginx side, I'm routing requests to "http://oursite.com/tickets" through to Apache, with the request URL being rewritten to exclude to /tickets part, so it's going through to Apache as "GET /index.pl", not "GET /tickets/index.pl". This is perfect and is working. I'm also rerouting the Apache "/otrs-web" requests, so when I hit the site through Nginx, everything appears and looks good.

The only problem I'm having is configuring OTRS to think it's behind the "/tickets" URL. Basically, all of the links that OTRS generates are broken because they're missing the "/tickets" part. I fixed a similar bug, for the "/otrs-web/" related stuff, by modifying the Frontend::WebPath setting, through the OTRS admin page, in the Core::Web section. That setting allowed me to tell OTRS to prefix those links with my Nginx-based URL. I need to figure out how to tell OTRS to prefix all other URLs with the required "/tickets" part.

I thought it would be the ScriptAlias setting in the Core section, but that doesn't seem to fix the issue.

To clarify: This is not Apache config related. The Apache routing is working fine. I need to tell OTRS that it's based out of a different root URL that what Apache is configured to serve from. This is because Nginx is configured to serve OTRS from this other base URL, and will reroute it appropriately to Apache.

Any ideas?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: OTRS+Apache behind Nginx, how to config OTRS base URL?

Post by crythias »

yes. don't let OTRS generate base of links.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Locked