Thread replies: 7
Thread images: 1
Anonymous
2016-03-26 14:37:56 Post No. 53696047
[Report]
Image search:
[Google]
Anonymous
2016-03-26 14:37:56
Post No. 53696047
[Report]
Does anyone here use nginx as a reverse proxy?
I want to build a setup where I have one address that reverse proxies multiple internal sites for external access, but I can't get it to work internally yet. As of now, I can access one internal site without any problems, works completely fine, even with https outside and http inside. When I add further sites however, I either get sites that are barely functional or simply get a 404 error.
The setup in the configuration file is essentially
server {
listen 443
location /webservera {
proxy_pass http://webservera.example.com/;
}
location /webserverb {
proxy_pass http://webserverb.example.com/;
}
}
Webserver A works fine, Webserver B gets me a 404 error. When I look in the error log I see that nginx is trying to access webserverb locally (i.e. normally you get redirecty to webserverb/index.php, but it will look for index.php on the nginx machine, not on webserverb).
Why is this only happening on webserverb (and for that matter, c, d and e as well)? What can I do to ensure the path to the site content is proxied as well and doesn't try to access stuff locally?