今天遇到的一个配置坑,总是502错误,搜来搜去都没人说这条,后来去看nginx的错误日志才发现的
n/php-fpm/php-fpm.sock:", host: "toutiao.huimabao.com"
2017/03/18 17:02:39 [crit] 1419#0: *6 connect() to unix:/var/run/php-fpm/php-fpm.sock failed (13: Permission denied) while connecting to upstream, client: 113.119.81.116, server: toutiao.huimabao.com, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "toutiao.huimabao.com" 2017/03/18 17:13:39 [crit] 1419#0: *8 connect() to unix:/var/run/php-fpm/php-fpm.sock failed (13: Permission denied) while connecting to upstream, client: 113.119.81.116, server: toutiao.huimabao.com, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "toutiao.huimabao.com" 2017/03/18 17:13:40 [crit] 1419#0: *8 connect() to unix:/var/run/php-fpm/php-fpm.sock failed (13: Permission denied) while connecting to upstream, client: 113.119.81.116, server: toutiao.huimabao.com, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "toutiao.huimabao.com" 2017/03/18 17:23:54 [notice] 1499#0: signal process started 有事记得去看错误日志,找不到日志文件? 你可以 find / -name *.log啊 然后人肉找