Welcome! Log In Create A New Profile

Advanced

Re: Proxy_pass and slash witch nginx

Maxim Dounin
May 18, 2011 03:52PM
Hello!

On Wed, May 18, 2011 at 12:11:33PM -0400, myckeul wrote:

> Hello,
>
> I set up a reverse proxy for a client with Nginx.
>
> I still have a problem when I click on a link but the name of the
> directory doesn't end with a slash.
>
> The proxy address is http://proxy.com and all requests are returned to
> http://mydomain.com
>
> Example: http://proxy.com/test/ and reference works well inside
> http://mydomain.com but remains on http://proxy.com/test/
>
> If I remove the slash of the end I don't have http://proxy.com/test in
> the address bar but http://mydomain.com/test/ (with slash at the end
> because the other web server adds).
>
> In the http headers I see a 301 but it is not handled by nginx visibly:
>
> http://proxy.com/test
>
>
> GET /test HTTP/1.1
> Host: proxy.com

[...]

> HTTP/1.1 301 Moved Permanently

[...]

> Location: http://mydomain.com/test/
>
> Age: 108
>
> I thought to rewrite the rules but it might cause trouble.
>
> If anyone has an idea on the subject, I'm interested.

http://wiki.nginx.org/HttpProxyModule#proxy_redirect

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Proxy_pass and slash witch nginx

myckeul May 18, 2011 03:36AM

Re: Proxy_pass and slash witch nginx

Maxim Dounin May 18, 2011 03:52PM

Re: Proxy_pass and slash witch nginx

myckeul May 19, 2011 03:18AM

Re: Proxy_pass and slash witch nginx

Igor Sysoev May 20, 2011 07:08AM

Re: Proxy_pass and slash witch nginx

myckeul May 20, 2011 08:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 294
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready