NGINX: connect() to unix:/var/run/php7.0-fpm.sock failed (2: No such file or directory)

Had the same problem.
Solution is very easy.

In nginx conf file you are trying upstreaming to

unix:/var/run/php7.0-fpm.sock

Correct path is

unix:/var/run/php/php7.0-fpm.sock


There is a mention about this in the documentation

Nginx communicates with PHP-FPM using a Unix domain socket. Sockets
map to a path on the filesystem, and our PHP 7 installation uses a new
path by default:

PHP 5 /var/run/php5-fpm.sock

PHP 7 /var/run/php/php7.0-fpm.sock

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)