Welcome! Log In Create A New Profile

Advanced

reverse proxy and nested locations

Wolfgang Hennerbichler
October 07, 2013 04:32PM
Hi list,

I'd like to have an elegant reverse proxy configuration, where I allow specific sub-URIs behind the reverse-proxy-URL for specific IP Adresses. My intended configuration looks like this:

# TRAC
location /trac {
proxy_pass https://my.web.server:443/trac/;
location /trac/project {
allow 10.32.1.146;
allow 10.64.0.6;
deny all;
}
}

However, the location /trac/project does not inherit the proxy-pass directive. It works if I add 'proxy_pass https://my.web.server:443/trac/;' in the location /trac/project. This is redundant and I don't like that.

I can't put the proxy_pass into the server directive, as this is a proxy-server that does different proxy passes according to different locations.
Any help for solving this in an elegant way?

Wolfgang

--
http://www.wogri.at

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

reverse proxy and nested locations

Wolfgang Hennerbichler October 07, 2013 04:32PM

Re: reverse proxy and nested locations

Maxim Dounin October 07, 2013 07:04PM

Re: reverse proxy and nested locations

Wolfgang Hennerbichler October 08, 2013 12:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 187
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