Win7下nginx默认80端口被System占用,造成nginx启动报错的解决方案
问题:
? ? ?在win7 32位旗舰版下,启动1.0.8版本nginx,显示如下错误:[plain]2012/04/02 13:55:59 [emerg] 7864#2376: 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)?
?
解决方案:
在cmd窗口运行如下命令: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端口
?