Welcome! Log In Create A New Profile

Advanced

upstream proxy support

Bernd Rössl
March 22, 2013 10:14AM
hi,

currently there is no way to rewrite to a url containing a schema and
proy_passing the request to a upstream since such a rewrite will end
up in a redirect. This is a problem if nginx is running behind a proxy
like squid which uses abolute url's to pass the request to. however,
absolute uri's are valid in requests and commonly used in proxies, for
details see http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2

attached is a patch with a fix for ngx_http_rewrite_module.c which
introduces a new flag for the rewrite directive called "noredirect" to
allow redirect targets containing a schema

in config this will look like this:

location = '/foo' {
rewrite .* "http://www.example.com/bar" noredirect;
proxy_pass http://squid-host;
}

regards,
bernd
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

upstream proxy support Attachments

Bernd Rössl 1029 March 22, 2013 10:14AM

Re: upstream proxy support

Maxim Dounin 416 March 22, 2013 10:42AM

Re: upstream proxy support

Bernd Rössl 890 March 22, 2013 11:16AM

Re: upstream proxy support

Maxim Dounin 512 March 22, 2013 11:36AM

Re: upstream proxy support

Bernd Rössl 679 March 22, 2013 01:24PM

Re: upstream proxy support

Francis Daly 550 March 23, 2013 09:02AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 204
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready