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)

问题:

1.nginx启动失败

2.在logs/error.log文件下,出现报错信息: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)

 目录:

1、cmd输入命令netstat -aon|findstr "80"

2.、查看80端口 7532对应的任务

3、结束对应任务

4、去启动nginx

 

1、cmd输入命令netstat -aon|findstr “80”

打开cmd

输入命令: netstat -aon|findstr "80" 查询谁占了80端口

2.、查看80端口 7532对应的任务

输入命令: tasklist|findstr "7532"

 原来是我之前打开过nginx程序占用了80端口,那就去关掉

3、结束对应任务

 结束任务7532.

4、去启动nginx

打开cmd,去对应的nginx目录,启动nginx

 浏览器输入localhost

 

启动成功


 

或者是 System 占用的80端口

 

 

这个有可能是 IIS服务 占用80端口 ,那就去尝试关闭IIS服务。

启动IIS服务 net start w3svc

关闭IIS服务 net stop w3svc

以管理员身份运行cmd,

输入命令net stop w3svc

 关闭IIS服务了,那就可以去尝试启动下nginx,看是否是IIS占用了80端口

 可以执行nginx.exe 那就是IIS占用了80端口。

posted @ 2024-04-15 14:25  小那  阅读(64)  评论(0编辑  收藏  举报