Reputation:
http://mydomain.com/ => 127.0.0.1:4567
but
http://mydomain.com/FOO => 127.0.0.1:3000
Is that possible?
So far I have:
upstream myserver {
server 127.0.0.1:4567;
server 127.0.0.1:4568;
}
location / {
proxy_pass http://myserver;
}
location /FOO/ {
proxy_pass http://127.0.0.1:3000;
}
But this points to http://127.0.0.1:3000/FOO/ and I want to pass only what comes after /FOO/
Thx
Upvotes: 5
Views: 7125
Reputation:
Ok the problem was pretty simple...
I was missing a / at the end of the proxy_pass argument
location /FOO/ {
proxy_pass http://127.0.0.1:3000/;
}
Upvotes: 10