目前我的Centos 6.8服务器上有502 Bad Gateway Error.
2017/01/30 23:57:31 [crit] 26911#0: *1 connect() to unix:/var/run/PHP/PHP7.0-fpm.sock Failed (2: No such file or directory) while connecting to upstream,client: 192.168.0.15,server: 192.168.0.$
我检查了目录是否存在但是没有.我能找到的最接近文件夹的是/ var / run / PHP-fpm,它只包含PHP-fpm.pid.
以下是解决此问题的步骤:
原文链接:/centos/373344.html>检查PHP-fpm是否正在运行:
sudo service PHP-fpm status sudo service PHP7-PHP-fpm status # use this if you are using remi PHP 7
>在PHP-fpm的www.conf配置文件中检查listen指令:
grep -Ri listen /etc/PHP/7.0/fpm/pool.d/www.conf grep -Ri listen /etc/opt/remi/PHP70/PHP-fpm.d # for remi
>确保您的Nginx fastcgi_pass指令与您的listen指令匹配.