nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
报错信息
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
定位方法
1.先使用ps -e | grep nginx查看是否已经启动了nginx
2.如果没有的话则按照提示,查看0.0.0.0:80端口谁占用了,使用netstat -ltunp命令,可以看到
可以看到0.0.0.0:80端口被nginx -g daemon进程占用了。
解决方案:kill -s 9 对应的pid
然后再次启动nginx就解决问题了。
标签:use,already,nginx,0.0,failed,emerg,Address,80 From: https://blog.51cto.com/u_14480168/6345126