Nginx重启时提示”nginx: [emerg] bind() to 0.0.0.0″解决方法

nginx服务器报错

2020/10/30 16:55:25 [emerg] 3944#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/10/30 16:55:25 [emerg] 3944#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/10/30 16:55:25 [emerg] 3944#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/10/30 16:55:25 [emerg] 3944#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/10/30 16:55:25 [emerg] 3944#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/10/30 16:55:25 [emerg] 3944#0: still could not bind()
2020/10/30 16:58:02 [emerg] 4164#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/10/30 16:58:02 [emerg] 4164#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/10/30 16:58:02 [emerg] 4164#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/10/30 16:58:02 [emerg] 4164#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/10/30 16:58:02 [emerg] 4164#0: bind() to 0.0.0.0:80 failed (98: Address already in use)

 

估摸着是在操作的时候忘记关闭Nginx导致启动冲突,这里要禁止掉端。

sudo fuser -k 80/tcp

最后我们再重启Nginx后显示正常:

/etc/init.d/nginx restart

本文由 我爱PHP169 作者:admin 发表,其版权均为 我爱PHP169 所有,文章内容系作者个人观点,不代表 我爱PHP169 对观点赞同或支持。如需转载,请注明文章来源。

发表回复