Welcome! Log In Create A New Profile

Advanced

Newbie Question: Sharing proxy_pass config between locations

Cabbar Duzayak
March 06, 2012 05:22PM
Hi,

I have a basic configuration that points to a back-end server with
proxy_pass and bunch of proxy_set_header call entries. And, I have
multiple locations entries that keep doing the same thing, e.g.

location / {
proxy_pass http://127.0.0.1:5000
proxy_set_header X-Real-IP $remote_addr;
... more proxy_set headers
}

location /x/ {
access_log off
proxy_pass http://127.0.0.1:5000
proxy_set_header X-Real-IP $remote_addr;
... more proxy_set headers
}

Is it possible to define this proxy_pass & proxy_set_headers once, and
share it between these locations? Or, do I need to keep doing this for
all?

Thanks.

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

Newbie Question: Sharing proxy_pass config between locations

Cabbar Duzayak March 06, 2012 05:22PM

Re: Newbie Question: Sharing proxy_pass config between locations

Francis Daly March 06, 2012 05:40PM

Re: Newbie Question: Sharing proxy_pass config between locations

Cabbar Duzayak March 07, 2012 04:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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