Dolomats
Dolomats

Reputation: 51

500 internal server error Nginx

I am having some trouble with Nginx i m getting [b]500 internal server error[/b]

So i went check the logs at[i] /var/log/nginx/error.log[/i]

And i found these Error :

2015/01/11 21:16:00 [emerg] 3365#0: bind() to xx.xxx.xxx.x:80 failed (98: Address already in use)
2015/01/11 21:16:00 [emerg] 3365#0: bind() to [::]:80 failed (98: Address already in use)
2015/01/11 21:16:00 [emerg] 3365#0: still could not bind()

I readed in another threat that it s because some other service is runing in same pot so i used this command : netstat -tulpn | grep --color :80

tcp        0      0 xx.xxx.xxx.x:80             0.0.0.0:*                   LISTEN      3102/nginx
tcp        0      0 0.0.0.0:8081                0.0.0.0:*                   LISTEN      3363/httpd
tcp        0      0 :::80                       :::*                        LISTEN      3102/nginx
tcp        0      0 :::8081                     :::*                        LISTEN      3363/httpd

So for me that mean that Nginx is runing well in the right port !

Please help

Upvotes: 0

Views: 6721

Answers (1)

Marcos
Marcos

Reputation: 844

take a look at it: https://rtcamp.com/tutorials/nginx/troubleshooting/emerg-bind-failed-98-address-already-in-use/

"Then it means nginx or some other process is already using port 80. You can kill it using: sudo fuser -k 80/tcp And then try restarting nginx again: service nginx start"

and this one: nginx - nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)

Upvotes: 1

Related Questions