tags:

views:

467

answers:

1

Hi I'm trying to proxy

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

A: 

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/;
}
bresc