时间:2020-11-07 00:07:40 | 栏目:Nginx | 点击:次
本文主要记录一下各种环境中 nginx 的错误和解决办法,下面话不多说了,来看看详细的介绍吧。
一、13: Permission denied
Nginx错误:
2017/04/19 14:46:46 [crit] 4172#0: *671 open() “/data/vhosts/xunlei.com/test/” failed (13: Permission denied), client: 192.168.35.54, server: www.test.com, request: “GET / HTTP/1.1”, host: “www.test.com”
解决方法:
经查权限问题导致,网站目录是 root 用户组,而 nginx 是运行的 nobody 用户进程,修改网站目录为 nobody 用户组。
二、111: Connection refused
Nginx错误:
2017/04/19 14:48:02 [error] 4172#0: *672 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.35.54, server: www.test.com, request: “GET / HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “www.test.com”
出现的原因:
1.php-fpm 服务没有开启
2.权限问题,查看目录用户组
总结