I have a scenario as follows.
Nginx is being used as a reverse proxy to a apache server listening at port 8080. nginx is running at port 80. There is a wsgi application which is being run by the apache server.
Now, I have added a proxy_pass to the nginx configuration such that whatever requests come to localhost/ (nginx port is the default port 80) they get redirected to localhost:8080.
Here is an excerpt from the nginx conf file:
server {
listen 80;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
location {
proxy_pass http://localhost:8080/
proxy_redirect http://localhost/ http://localhost:8080/
}
}
I have added the proxy redirect to take care of any redirects from the apache server so that any req