nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

Posted l-zl

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)相关的知识,希望对你有一定的参考价值。

[[email protected] ~]# journalctl -xe
Jan 29 localhost 10:39:20  nginx[8556]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Jan 29 localhost 10:39:20  nginx[8556]: nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
Jan 29 localhost 10:39:20  nginx[8556]: nginx: [emerg] still could not bind()
Jan 29 localhost 10:39:20  systemd[1]: nginx.service: control process exited, code=exited status=1
Jan 29 localhost 10:39:20  systemd[1]: Failed to start The nginx HTTP and reverse proxy server.

 

说明80端口被占用,杀掉这个进程:
[[email protected] ~]# killall -9 nginx
再次启动nginx:
[[email protected] ~]# /usr/local/nginx/sbin/nginx
查看是否启动:
[[email protected] ~]# ps aux|grep nginx





以上是关于nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)的主要内容,如果未能解决你的问题,请参考以下文章