Not listing proxy_pass port 8009
imran_kh
nginx-forum at nginx.us
Wed Jul 24 19:19:47 UTC 2013
Hello,
I have observed that, Nginx configured on port 80 as per
/etc/nginx/sites-enabled/default file but it is listening on port 8080 and
80. Please see the details for the same.
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;
}
}
Port 8080 is listening on Public IP address.
# sudo netstat -anop | grep :8080
tcp 0 0 Public_IP:8080 0.0.0.0:* LISTEN
18674/nginx off (0.00/0/0)
Port 80 is listening on 0.0.0.0
# sudo netstat -anop | grep :80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
18674/nginx off (0.00/0/0)
When I am trying to start the nginx service without init.d script getting
below message.
#sudo /usr/sbin/nginx
[sudo] password for xyz:
nginx: [warn] conflicting server name " example.com " on 0.0.0.0:80,
ignored
nginx: [warn] conflicting server name " example1.com " on 0.0.0.0:80,
ignored
nginx: [warn] conflicting server name "example.com " on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "example2.com " on 0.0.0.0:80,
ignored
nginx: [emerg] bind() to Public_IP:8080 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to Public_IP:8080 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to Public_IP:8080 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to Public_IP:8080 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to Public_IP:8080 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
Thanks,
Imran Khan.
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,241157,241203#msg-241203
More information about the nginx
mailing list