Problem with a reverse proxy and trailing slash redirects
francis at daoine.org
Fri Aug 15 22:17:31 UTC 2014
On Fri, Aug 15, 2014 at 02:33:39PM -0300, Andre Nathan wrote:
> The problem with this setup is that if one tries to access, say,
> foo.tmpzone.com/blah, Nginx will issue a 301 redirect adding a trailing
> slash, but the Location will be set to "www.foo.com/blah/". This seems
> to be due to the proxy_set_header directive, which is needed for the
> backend server to find the appropriate virtual host.
> Is there any way to override this behavior and have Nginx redirect to
> foo.tmpzone.com/blah/ instead? I tried turning on the
> server_name_in_redirect directive, but it didn't work.
Francis Daly francis at daoine.org
More information about the nginx