修改nignx报错Nginx [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了修改nignx报错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的配置时出现,表名80端口被程序占用

                   

列出所有端口:

netstat –ntlp

发现端口是被nginx本身占用了,于是关闭占用80端口的程序

sudo fuser -k 80/tcp

之后开启nginx无异常

 

 

使用linux一键安装包安装的环境

http://lnmp.org/

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

nginx: [emerg] unknown directive “ ” in /usr/local/nginx/nginx.conf.conf:xx报错处理

nginx [emerg] socket() []80 failed (97 Address family not supported by protocol)

启动Nginx报错nginx: [emerg] getpwnam(

nginx启动报错!~~帮忙看看

启动服务报错:nginx: [emerg] bind() to 0.0.0.0:80 failed

nginx检查报错:nginx: [emerg] "server" directive is not allowed here in