Nginx - assigning non-root location to proxy_pass
- by xyzman
What I like to do is to proxy requests from http://example.com/proxy/foo to http://localhost:8060/foo
This config proxies http://example.com/proxy/foo to http://localhost:8060/proxy/foo
server {
server_name example.com;
location /proxy/ {
proxy_pass http://localhost:8060;
}
location / {
proxy_pass http://localhost:8040;
}
}