nginx启动时报错:启动失败
nginx: [error] CreateFile() "C:\web\nginx-1.17.9/logs/nginx.pid" failed (2: The system cannot find the file specified)
执行命令 nginx -t 查询nginx的配置
C:\web\nginx-1.17.9>nginx.exe -t
nginx: the configuration file C:\web\nginx-1.17.9/conf/nginx.conf syntax is ok
nginx: [emerg] bind() to 0.0.0.0:8090 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)
nginx: configuration file C:\web\nginx-1.17.9/conf/nginx.conf test failed
问题大概如上
其中问题: 80端口被占用了
10013: An attempt was made to access a socket in a way forbidden by its access permissions
解决办法:
cmd 输入 netstat -aon | findstr :80
输入 tasklist|findstr "15616"
找到任务管理器 -- 详细信息
手动关闭