My site showing error 502 Bad Gateway . on checking error log file i found error -
connect() to unix:/var/run/php-fpm.sock failed (2: No such file or directory) while connecting to upstream, client
how can i fixed this issue ?
Log into WHM as root. Search “PHP-FPM” and select PHP-FPM service for Apache. Select Yes to restart the PHP-FPM service.
PHP-FPM (FastCGI Process Manager) is an alternative to FastCGI implementation of PHP with some additional features useful for sites with high traffic. It is the preferred method of processing PHP pages with NGINX and is faster than traditional CGI based methods such as SUPHP or mod_php for running a PHP script.
To find out php version installed on the server type any one of the following commands on your server. Open the terminal prompt and then type the following commands. Are you using php-fpm? Get php version using the php-fmp -v or php-fpm73 -v command.
Depending what version of php-fpm
you are using, you need one of the following commands:
sudo service php5-fpm restart // php 5.x
sudo service php7.0-fpm restart // php 7.0.x
sudo service php7.1-fpm restart // php 7.1.x
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With