Recently because of the work needs, to the Nginx site root directory changes, through some online tutorial changes, but found that the test has been prompted 403 Forbidden error, backstage through a friend's tips also solved, so now will be detailed
Introduction to the problem
403 is a very common error code returned by the Web server, with the 403 error defined in the HTTP protocol as follows
403 ForbiddenThe server understood the request, but is refusing to fulfill it. Authorization won't
Many IIS administrators have encountered this common error "403-forbidden access. this encoding information may mislead many people and think it is a problem related to the NTFS permission, but it is not actually related to authentication and access
403.1-Execution access is prohibitedThe following are two common causes of this error message:1. You do not have sufficient execution permissionFor example, this error message appears if the directory where the ASP page you are attempting to access
HTTP Error 400400 Request ErrorThe server was unable to understand the request because of a malformed syntax. Without modification, the client program cannot repeat the request.HTTP Error 401401.1 Unauthorized: Login failedThis error indicates that
2, Includeoptional conf.d/*.confNote that PHP does not parse the module that did not introduce PHP, this is the introduction of a number of module servers, including PHP, MySQL3, remember to configure the default IP access path and permissions,
Common Causes of nginx 403 forbidden are: Missing index files and permissions.1. Missing index.html or index. php files
Server {listen 80; server_name localhost; index. php index.html; root/var/www ;}
If no index.php or index.html is available
Common, causes the Nginx 403 forbidden to have two kinds of reasons, first is the missing index file, two permissions question.
1, missing index.html or index.php files
Copy Code code as follows:
server {
Listen 80;
server_name localhost;
· 400-Incorrect request.
· 401-Access denied. IIS defines many different 401 errors, which indicate more specific error causes. These specific error codes are displayed in the browser but not in the IIS log: · 401. 1-Logon Failed.
· 401-login failed
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.