美文网首页
An attempt was made to access a

An attempt was made to access a

作者: 小程序前端超市 | 来源:发表于2019-06-13 10:52 被阅读0次

如遇到启动nginx报这个错误

An attempt was made to access a socket in a way forbidden by its access permissions

原因可能是默认80端口被占用了,这时我们可以修改conf/nginx.conf把80端口改成90或其他

修改如下:

 server {
        listen       90;
        server_name  localhost;

修改完成后,重新启动nginx

nginx-1.14.2> start nginx.exe

如果直接reload的话

nginx-1.14.2> nginx -s reload

会报以下错误

CreateFile() "C:\nginx-1.14.2/logs/nginx.pid" failed (2: The system cannot find the file specified)

主要是因为log/nginx.pid文件不存在,无法根据nginx进程id重启。

写到最后,欢迎关注作者:http://fenxianglu.cn/

相关文章

网友评论

      本文标题:An attempt was made to access a

      本文链接:https://www.haomeiwen.com/subject/kpsjfctx.html