報錯信息nginx
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)
定位方法socket
1.先使用ps -e | grep nginx查看是否已經啓動了nginxpost
2.若是沒有的話則按照提示,查看0.0.0.0:80端口誰佔用了,使用netstat -ltunp命令,能夠看到spa
能夠看到0.0.0.0:80端口被httpd這個進程佔用了(也就是apcache佔用)blog
關閉httpd服務便可: service httpd stop進程