My set up is as follows:
- Webserver: app listening on port 8529.
- Reverse proxy: Nginx listening on port 80.
The problem is that my Nginx redirects requests to port 8529 and this appears in the URL like so http://some.domain.com:8529/foo
, which isn't what I want to accomplish.
My current nginx sites-available
related file is as follows:
server {
listen 80;
server_name some.domain.com;
location / {
proxy_pass http://localhost:8529/foo;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
}
}
Where some.domain.com
is within /etc/hosts
pointing to 127.0.0.1
.
Any hints?