2 Answers
我也是同样的问题,检查nginx的错误日志如下:
2019/08/19 15:09:03 [crit] 6668#0: *4 connect() to unix:/dev/shm/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.33.1, server: shop.com, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://unix:/dev/shm/php-cgi.sock:", host: "shop.com"
php5.6安装好之后,用php -v 查看php版本 确认是php5.6
/dev/shm/php56-cgi.socket也是存在的。
但是nginx的错误日志显示调用的php-cgi.socket
查看nginx.conf未找到php-cgi关键字
百思不得骑姐:
后来在/usr/local/nginx/conf/vhost/下对应的 域名配置文件中发现了php-cgi。
于是把php-cgi换成php56-cgi后,重启nginx即可
2019/08/19 15:09:03 [crit] 6668#0: *4 connect() to unix:/dev/shm/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.33.1, server: shop.com, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://unix:/dev/shm/php-cgi.sock:", host: "shop.com"
php5.6安装好之后,用php -v 查看php版本 确认是php5.6
/dev/shm/php56-cgi.socket也是存在的。
但是nginx的错误日志显示调用的php-cgi.socket
查看nginx.conf未找到php-cgi关键字
百思不得骑姐:
后来在/usr/local/nginx/conf/vhost/下对应的 域名配置文件中发现了php-cgi。
于是把php-cgi换成php56-cgi后,重启nginx即可
Please login or Register to submit your answer