Maxim Dounin
March 22, 2013 11:36AM
Hello!

On Fri, Mar 22, 2013 at 04:14:18PM +0100, Bernd Rössl wrote:

> hi,
>
> do you mean something like a new proxy directive like for example
> "proxy_server"?
>
> upstream squid {
> server squid-host:3128;
> }
> upstream example {
> server www.example.com:80;
> }
>
> location = '/foo' {
> proxy_server squid;
> proxy_pass http://example/bar http://www.example.com/bar";
> }
>
> if "proxy_server" has been set this will be used as the actual upstream and
> the upstream from the proxy_pass will be used for request building.

Or something like proxy_uri, which would allow to redefine URI
used in a request line. This way it will be more consitent with
fastcgi_pass and friends. (It is not clear how this should be
inherited though.)

Note though that overall we are not really intrested in teaching
nginx to talk to forward proxies, and probably simpliest
solution for a specific problem for now would be to abuse rewrite
problems and force it to work like with your original patch.
Something like this should work (note leading space):

location / {
rewrite ^ " http://foo/bar" break;
proxy_pass http://squid;
}

It should do roughly the same as your original patch, but doesn't
pretend this is correct and supported.

(Please don't post html here, use plain text. Thank you.)

--
Maxim Dounin
http://nginx.org/en/donation.html

_______________________________________________
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 1031 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 681 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: 150
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