Home > Article > Operation and Maintenance > How to solve the 403 problem caused by nginx configuration
Solution to 403 problems caused by nginx configuration
1. Problem: 403 appears when curling the local domain name configured by nginx
nginx_error.log The log is as follows:
##2. Questions
1. www The configuration of .requesturi.com is as follows: It is found that the root directory is inconsistent with the forbidden files in the error log. In theory, when accessing www.requesturi.com, you should go to /usr/local/nginx/html1 to find it. Why does it show that it is indeed /usr/local? Access to /nginx/html is prohibited?3. Solution
It can be roughly inferred that www.requesturi.com may not be configured in nginx.conf . Check nginx.conf and find that www.requesturi.com is not configured, and nginx does not allow access to the file directory by default, so a 403 error will occur.The above is the detailed content of How to solve the 403 problem caused by nginx configuration. For more information, please follow other related articles on the PHP Chinese website!