Starting nginx: 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] 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] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
[FAILED]
解决:尝试了多种方式,最后找到了适合自己的一种
端口冲突问题,是httpd服务开启占用
先在/etc/sysconfig/iptables中添加一行
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
之后reboot重启
重启后关闭httpd服务,service httpd stop
启动nginx服务
此时即可