Solve a setup problem of lnmp

Source: Internet
Author: User
The environment is as follows: 1. nginxphp-fpm execution users and user groups are both wwwid5002. To secure the creation of a new site, aaa.com, usrsbinuseradd-gwwwaaa creates an aaa user to add nginx and php-fpm user groups, ''create the www directory in the user's home directory to put the network... the environment is as follows:
1. The execution user and user group of nginx php-fpm are both www id 500
2. Create a site for security purposes, aaa.com,
/usr/sbin/useradd -g www aaaCreate an aaa user to join the user group where nginx and php-fpm are located,
''
Create the www directory in the user's home directory to place the website, but the permissions are all 0777, the file owner is aaa, and the server is centos 6.7
The nginx error log is still
2016/03/02 10:09:57 [crit] 21803#0: *59 stat() "/home/aaa/sites/aaa.com/index.php" failed (13: Permission denied), client: XXXX.XXXX.XXXX.XXXX, server: aaa.com, request: "GET / HTTP/1.1", host: "aaa.com"
Solving? Is my settings incorrect?

It is reasonable to say that www should be executed at least.

Reply content:

The environment is as follows:
1. The execution user and user group of nginx php-fpm are both www id 500
2. Create a site for security purposes, aaa.com,
/usr/sbin/useradd -g www aaaCreate an aaa user to join the user group where nginx and php-fpm are located,
''
Create the www directory in the user's home directory to place the website, but the permissions are all 0777, the file owner is aaa, and the server is centos 6.7
The nginx error log is still
2016/03/02 10:09:57 [crit] 21803#0: *59 stat() "/home/aaa/sites/aaa.com/index.php" failed (13: Permission denied), client: XXXX.XXXX.XXXX.XXXX, server: aaa.com, request: "GET / HTTP/1.1", host: "aaa.com"
Solving? Is my settings incorrect?

It is reasonable to say that www should be executed at least.

Let's take a look at the website's web directory permissions.

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.