Welcome! Log In Create A New Profile

Advanced

trailing slash in location

November 18, 2012 08:25AM
Please help me understand

The below works

location /stats/ {
proxy_pass http://example.com;
}

or

location /stats {
proxy_pass http://example.com;
}

or

location /stats {
proxy_pass http://example.com/stats;
}

or

location /stats {
proxy_pass http://example.com/stats/;
}

or

location /stats/ {
proxy_pass http://example.com/stats/;
}

But this does not work

location /stats/ {
proxy_pass http://example.com/stats;
}

Smlly when stats is an upstream

This works

location /stats {
proxy_pass http://stats;
}

but this does not

location /stats {
proxy_pass http://stats/;
}

What difference it makes when we have uri in the proxy_pass?

Regards
Amod
SubjectAuthorPosted

trailing slash in location

amodpandeyNovember 18, 2012 08:25AM

Re: trailing slash in location

Igor SysoevNovember 18, 2012 10:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 109
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready