windows10启动 nginx 报错: [emerg] bind() to 0.0.0.0:80 failed (10013: An attempt was made to access

windows10启动 Nginx启动报错

解决办法

1、  按键盘win+r 打开运行界面,输入cmd,确定,打开管理员界

2  、输入netstat -aon | findstr :80 

                   查看后,pid值为 4

3 、 输入 tasklist|findstr "4"    

4.发现是80端口被System占用了 ,输入 netsh http show servicestate

5.,运行中输入regedit打开注册表编辑器。

6.找到 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP   

找到Start,右键修改将数据 改为4。

7、重新启动系统,System进程就不会占用80端口,nginx就可以正常启动。

8、再次启动nginx,可以正常启动,可以在浏览器http://localhost/ 查看。

猜你喜欢

转载自blog.csdn.net/qq_32265203/article/details/110088489