I\'ve just recently moved my websites from apache2 to Nginx as my new web server backend. got to love problems aha.
HTML files in the web host director work prior to php
/var/run/ is probably actually a symlink to /run/
/var/run/
/run/
/run/ belongs to root and permissions are 755. php-fpm is running as www-data so can't create a socket in /run/
The solution is to create /run/php/and change ownership to www-data, then change your socket path to /run/php/php-fpm.socket
/run/php/
/run/php/php-fpm.socket