Nginx启动报错:10013: An attempt was made to access a socket in a way forbidden

Nginx在win7,win2008下启动报错: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) 。

原因是Win7下nginx默认80端口被System占用,造成nginx启动报错的解决方案。

在cmd窗口运行如下命令:
 
[plain]
C:\Users\Administrator>netstat -aon | findstr :80  
 
看到80端口果真被占用。发现占用的pid是4,名字是System。怎么禁用呢?
 
1、打开注册表:regedit
 
2、找到:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP
 
3、找到一个REG_DWORD类型的项Start,将其改为0
 
4、重启系统,System进程不会占用80端口
 

重启之后,start nginx.exe 。在浏览器中,输入127.0.01,即可看到亲爱的“Welcome to nginx!” 了。



http://www.360sdn.com/Nginx/2014/0807/4044.html

你可能感兴趣的:(Nginx启动报错:10013: An attempt was made to access a socket in a way forbidden)