Problem: nginx/fpm/php all PHP files say ' File not found. ' Resolution: Possible Scenario 1:
In the Nginx php-fpm configuration problem (1), we analyze a possible cause, in this article, we
Analyze another scenario that could lead to this problem.
In nginx.conf I configured the user and group information for, (according to my own machine situation configuration, here does not consider security issues, I configured for my usual use of the user name and user group):
User staff and staff;
1And in php-fpm.conf configuration, I do not configure user and group information, there is a default value2; Unix user/Group of Processes3; Note:the User isMandatory. If the Group isNotSet, thedefaultUser'S Group4 , would be used.5 //Default configuration6user =_www7Group =_www8 //Instead, this will be the same as the configuration in the nginx.conf above9user = StaffTenGroup = Staff
This is not the same as the configuration in our nginx.conf, because of the permissions problem, it will also cause the PHP file can not resolve the problem.
Possible Scenario 2:
The above is the user and group permissions issues in the configuration, another possibility is that we want to access the file or directory does not have permissions, here is the permission to read and write permissions, and specifically in the above nginx.conf and php-fpm.conf configured in the user and group permissions to the file.
Because our PHP files need to execute, so must have X (execute) permissions (including directories), I here for the sake of simplicity, the file and directory permissions are set in order to read and write execution all, novice did not consider security issues.
Nginx PHP-FPM configuration issues (2)