Forum: NGINX Problem with a reverse proxy and trailing slash redirects

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8b4249ca3bb8c123da9f7aca63a652e1?d=identicon&s=25 Andre Nathan (Guest)
on 2014-08-15 19:34
(Received via mailing list)
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
36a8284995fa0fb82e6aa2bede32adac?d=identicon&s=25 Francis Daly (Guest)
on 2014-08-16 00:18
(Received via mailing list)
On Fri, Aug 15, 2014 at 02:33:39PM -0300, Andre Nathan wrote:

Hi there,

> 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.

http://nginx.org/r/proxy_redirect

  f
--
Francis Daly        francis@daoine.org
This topic is locked and can not be replied to.