原文链接:https://dsx2016.com/?p=1809
公众号:大师兄2016
检测nginx
本文示例为nginx代理https(使用自签名证书),window启动nginx报错
启动前检测ngixn
输入命令
nginx -t
如图所示,报错
nginx: [emerg] bind() to 0.0.0.0:443 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)
原因是其他进程占用了443端口,导致当时用nginx代理https 443端口冲突
找到443进程
解决nginx报错问题的方式就是杀掉占用443的进程
先找到占用,输入命令
netstat -aon|findstr "443"
可以看到占用443进程的PID为7044
杀掉进程
输入命令
taskkill /f /t /im 7004
或者输入
TASKKILL /PID 7004 /T
重新启动nginx
END.