nginx and PHP = 502 Bad Gateway : full detail
April 07, 2015 01:56AM
Please help.

Here is my setup.
OS: ubuntu 14.04.2 LTS
nginx : 1.6.2
php: PHP 5.6.7

I can see the web page file ok, but not the php.

I check the error log by the following command
cat /var/log/nginx/error.log

output as:
2015/04/07 11:36:32 [error] 7495#0: *1 connect() to unix:/var/run/php5-fpm.sock failed (111: Connection refused) while connecting to upstream, client:, server: _, request: "GET /info.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: ""

How can I fix the issue?

Re: nginx and PHP = 502 Bad Gateway : full detail
January 17, 2019 05:17PM
Fixed it by un-commenting the line

max_execution_time = 30

in /etc/php5/fpm/php.ini
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 84
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready