Nginx 403 forbidden, nginx no input file specified

Source: Internet
Author: User

Configure nginx + PHP: http://www.cnblogs.com/huayangmeng/archive/2011/06/15/2081337.html under Windows

Ngnix 403 Forbidden

There are three possible causes on the Internet:
1. The specified webroot directory has insufficient permissions: escalate permissions.
2. the file to be accessed does not exist:If PHP is integrated, you will run localhost. In fact, you need to access the index. php file under webroot. ThisCheck whether the file does not exist. If the file does not exist, add the file to be accessed.
3. configuration error. nginx does not support access to index. php by default. Therefore, you need to add index. php, as shown below:

Location /{
Root D:/web/CG;
Index index.html index.htmIndex. php;
}

No input file specified

 Cause: http://blog.163.com/cobyeah@126/blog/static/140137653201142945054441/
Solution:
Location ~ \. PHP $ {
RootD: /Wnmp/WWW;
Fastcgi_pass 127.0.0.1:9000 ;
Fastcgi_index Index . PHP ;
Fastcgi_param script_filename $ Document_root $ Fastcgi_script_name ;
Include fastcgi_params ;
}

 

 

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.