nginx php 502 bad gateway

今天配centos6.3+nginx+php5.4.15(fpm),蛋碎了无数次,其中一个问题就是配PMA的时候,访问phpMyAdmin时,出现下面错误。

phpMyAdmin – Error

Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.第一次打开提示,刷新提示:

502 bad gateway

查看nginx error log:

[error]  recv() failed (104: Connection reset by peer) while reading response header from upstream, client:, server: , request: “GET / HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “mysql.veryi.com”

查看php session.save_path的设置,默认是/var/lib/php/session。修改该目录nginx进程的用户有读写权限。问题解决。

参考

 

发表评论

电子邮件地址不会被公开。 必填项已用*标注