Today, I have a title problem.
Got a lot of information on the Internet.
I finally found a way to solve my problem in this link.
https://stackoverflow.com/questions/23443398/nginx-error-connect-to-php5-fpm-sock-failed-13-permission-denied/23596317
This is a problem that may not be the case for everyone.
I summed up the following two points, can be in these two directions to solve the problem:
1. In the nginx.conf file, the root command and the Fastcgi_param command are consistent with the path to the file you want to access.
2. Is the issue of permissions.
Can be viewed through Nginx's Error.log,
Connect () to UNIX:/RUN/PHP/PHP5. 6-fpm.sock failed (: Permission denied)
If you have the above error message, the description is Php-fpm.sock permissions issue.
You can view the owning group and the owning user of php-fpm through the php-fpm www.conf file.
user=www-Data//This is the owning usergroup =www-data//This is the owning groups
Then fix the permissions problem by modifying the Nginx user group.
sudo usermod-ag www-data nginx
The last restart of the Nginx service is OK.
Lnmp built, nginx under PHP file 404 but html file normal access "resolved"