解决nginx bind() to 0.0.0.0:80 failed 问题

Posted 洛阳之晨,譬如临安初雨

tags:

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

nginx的配置文件一开始默认是80端口,出现这个错误多半是80端口已经被占用。这时候只需要把

 

server {
listen 8088;
server_name localhost lcsf.com;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
proxy_pass http://lcsf.com;
proxy_redirect default;
}

这个地方的listen改成一个没有被占用过的端口然后重启nginx就可以解决

 

2016/06/27 13:38:35 [emerg] 6040#7180: bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)

 

这样的错误了

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

解决nginx bind() to 0.0.0.0:80 failed 问题

解决Mac nginx问题 [emerg] 54933#0: bind() to 0.0.0.0:80 failed (13: Permission denied)

[运维] 如何解决 nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)

nginx启动提示nginx: [emerg] bind() to 0.0.0.0:8080 failed (98: Address already in use)

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

Starting nginx: nginx: [emerg] bind() to 0.0.0.0:8088 failed (13: Permission denied) nginx 启动失败