"Linux" Nginx will report 404 error when insufficient authority

Source: Internet
Author: User

Root,mxx on the machine account switching, some of the file owners and groups are root account causes Mxx account to start nginx after access to the package following error

Know that it may be related to a path or permission, or that the script_filename variable is not set correctly (this is the most common reason for nginx)

1) If HTML also has a 404 error, then the document root setting has a problem

2) Check the permissions of the script file, possibly PHP or Web server cannot read it

3) Script_filename Setup Error

Workaround:

Because the environment has not moved at all, it has been copied, so the problem appears in the Directory folder and file access to permissions. Because you do not want to start under root (in fact, PHP does not allow the root account to start, the reason is unknown) and then reset the file owner and user groups, immediately access to the background

To change the command for a user group under root:

Chgrp-r General Account Directory

Change owner command under Root

Chown-f General Account Directory

"Linux" Nginx will report 404 error when insufficient authority

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.