nginx启动提示nginx: [emerg] bind() to 0.0.0.0:8080 failed (98: Address already in use)
Posted superboy@.
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了nginx启动提示nginx: [emerg] bind() to 0.0.0.0:8080 failed (98: Address already in use)相关的知识,希望对你有一定的参考价值。
目录
nginx启动报错
今天在centos7部署nginx,安装时一切顺利,但是在启动的时候却报错了,提示如下错误:
后经排查,原来是端口占用了。
解决办法:
1.重启防火墙
systemctl restart iptables.service
2.查看8080端口被占用的进程
lsof -i:8080
3.通过kill命令干掉该进程
4.重新启动nginx
这个时候在启动nginx,一切正常了!
以上是关于nginx启动提示nginx: [emerg] bind() to 0.0.0.0:8080 failed (98: Address already in use)的主要内容,如果未能解决你的问题,请参考以下文章
启动Nginx报错nginx: [emerg] getpwnam(
解决nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Starting nginx: nginx: [emerg] bind() to 0.0.0.0:8088 failed (13: Permission denied) nginx 启动失败