Nginx PHP-FPM configuration issues (2)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.