nginx启动失败
查看nginx的错误日志 error.log
1、cmd输入命令netstat -aon|findstr “80”
打开cmd
输入命令: netstat -aon|findstr “80” 查询谁占了80端口
C:\Users\x1c>netstat -aon|findstr "80"
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 7532
TCP 0.0.0.0:902 0.0.0.0:0 LISTENING 4780
TCP 0.0.0.0:912 0.0.0.0:0 LISTENING 4780
TCP 0.0.0.0:6800 0.0.0.0:0 LISTENING 10844
TCP 0.0.0.0:8082 0.0.0.0:0 LISTENING 12892
TCP 127.0.0.1:10808 0.0.0.0:0 LISTENING 13880
2、查看80端口75332对应的任务
输入命令: tasklist|findstr “7532”
C:\Users\x1c>tasklist|findstr "7532"
nginx.exe 7532 Console 1 7,440 K
3、结束对应任务
结束任务7532.