您现在的位置:首页 >> 前端 >> 内容

nginx启动报错 bind() to 0.0.0.0:80 failed如何解决?

时间:2018/4/24 14:13:53 点击:

  核心提示:nginx启动报错 bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbid...

nginx启动报错 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)

简单粗暴:直接改监听端口就行了,惹不起你还躲不起么,我改成81端口

   server {
        listen       81;
        server_name  localhost;
        location = / {
           #精确匹配 / 指向主页
           proxy_pass https://127.0.0.1:8888/page/index.html;
    }

访问的时候加上81端口,或者在hosts文件内增加一条127.0.0.1:81 localhost 

Tags:NG GI IN NX 
作者:网络 来源:Maker_xy的博