今天在windows系统上启动了一下nginx,以前以为闪一下就启动成功了,结果没有发现进程。
打开日志看一下,报错[emerg] 15060#200: bind() to 0.0.0.0:80 failed (10013: An attempt was madeto access a socket in a way forbidden by its access permissions)
cmd
输入netstat -aon | findstr :80
输入tasklist|findstr “4”,发现占用80端口的进程有点多
80端口被System进程占用,且无法关闭
windows+r -》regedit-》HKEY_LOCAL_MACHINE-》HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP-》右击“Start”,点击修改-》修改“数值数据(V)”为0 —》重启电脑
start nginx 启动成功