21

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 ?

Manoj Patidar
  • 1,171
  • 2
  • 11
  • 29

1 Answers1

49

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
Jerodev
  • 32,252
  • 11
  • 87
  • 108