nginx The system cannot find the file specified
- 前端
- 三生万物
- 0
遇到这个问题,先检测配置文件是否测试通过
E:\nginx-1.14.2>nginx -t -c conf/nginx.conf
nginx: the configuration file E:\nginx-1.14.2/conf/nginx.conf syntax is ok
nginx: [emerg] 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)
nginx: configuration file E:\nginx-1.14.2/conf/nginx.conf test failed
明显看出测试失败,这里把造成失败的原因处理掉就行了。
例如上面提示80端口访问socket被禁止,一把梭直接把80端口的服务先注释掉,再执行命令测试启动
E:\nginx-1.14.2>nginx -t -c conf/nginx.conf
nginx: the configuration file E:\nginx-1.14.2/conf/nginx.conf syntax is ok
nginx: configuration file E:\nginx-1.14.2/conf/nginx.conf test is successful
E:\nginx-1.14.2>start nginx
E:\nginx-1.14.2>nginx -s reload
E:\nginx-1.14.2>
如果 nginx.conf 配置测试没问题,再执行reload报错,这里就要看下是否启动nginx了,最后还有异常的话,就打开资源管理器把nginx进程干掉重试吧。
免责申明:本站发布的内容(图片、视频和文字)以转载和分享为主,文章观点不代表本站立场,如涉及侵权请联系站长邮箱:xbc-online@qq.com进行反馈,一经查实,将立刻删除涉嫌侵权内容。