nginx: [emerg] bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way f

在下载了nginx后,cmd下运行nginx.exe文件时,出现错误nginx: [emerg] 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)
意思是80端口被占用,只需要找到nginx 的配置文件conf文件,打开nginx.conf,把里面的

server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   html;
            index  index.html index.htm;
        }

listen 80 ;改成没有占用的端口就可以了,然后cmd下运行nginx.exe文件,重启。

©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页