启动Nginx时,出现以下报错:
[root@yandada ~]# service nginx start
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()
此报错原因为:80端口被占用;
解决方法:
[root@yandada ~]# killall -9 nginx
[root@yandada ~]# service nginx start