the port in proxy_pass is not for listening/accepting incoming
connections - it is for connecting outwards to another server/service
You must have something else (another httpd, probably not nginx)
listening on 8009......?
On 23/07/13 17:39, imran_kh wrote:
Hello,
I am using Nginx web server and getting error “502 bad gateway” while
accessing some sites.
I have observed that, proxy_pass port is not listing in the server.
e.g.:- In above configuration example.com is running on port 80 and
proxy_pass localhost is running on port 8009.
Port 80 is listing perfectly but port 8009 is not listing because of this
reason example.com is not working. Please suggest me on this.
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://localhost:8009;
send_timeout 6000;
proxy_read_timeout 120;
proxy_connect_timeout 120;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
}
}
Thanks,
Imran Khan.
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,241157,241157#msg-241157
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx