Several reasons of causing Nginx 403 Forbidden

Source: Internet
Author: User
Tags nginx server

Forbidden, from the literal meaning is the meaning of rejection, so the first impression is that the issue of permissions, meaning that you are currently Nginx users to target files, such as index.html and so did not read permissions. So the first way to solve the problem of Nginx permissions is to open permissions. Here you can change the destination folder permissions you want to access to nginx user readable, such as: Chmod-r 755 floder_name

Remove this reason, if you want to access the target file does not exist, it will naturally be 403 wrong, in fact, this is also the first to eliminate the problem, to ensure that the file to access the real existence.

The third reason is the domain name of the reason, here to give me a job encountered in the problem, I have a nginx server as an agent to use, he has two IP, respectively, for 10.10.10.100 and 192.168.0.100, The IP of the back-end RS is 172.16.0.100, this RS has a file directory for video, I visit the 10.10.10.100/video page normal return, but access to 192.168.0.100/video is 403 error, This can basically exclude the previous mentioned two reasons, after troubleshooting nginx configuration file, found in the configuration server_name, 10.10.10.100 have configuration, but 192.168.0.100 did not, it seems that the problem is here, after reconfiguration, the normal return of the page

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.