5

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

1 Answer 1

10

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/;
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.