Configure Nginx support PHP, there is no input file specified error resolution method

Source: Internet
Author: User

Today there is a project on a module, the program using PHP written, the server needs to build PHP environment, because my company's servers are Windows series, originally two days ago bought a new server, built an IIS server, run an ASP project, Now we have to deploy a PHP project, which I would like to configure directly on IIS to support PHP, but I think the performance may not be very high, So want to use Apache2.2 to build an environment, this heavyweight is a bit big, so again to Nginx, this is very small, use is very convenient, the function is very powerful, after configuration, access to PHP files, the "No input file specified" information, To the Nginx log to view, is 404, that is not found PHP files, may be the problem of the path, so online to find a bit, online a variety of methods, such as change doc_root, to directory plus permissions, modify buffer pool or must specify the correct script_filename, Fastcgi_param script_name $fastcgi _script_name;fastcgi_param script_filename $document _root$fastcgi_script_name; And so on are not valid. Finally found an article, according to the above configuration, the problem solved, the method is as follows:



In the php.ini file, modify:

1. Add a line (the most important)

Fastcgi.impersonate = 1

2. Modify two items (to undo the comment)

Cgi.fix_pathinfo=1
Cgi.force_redirect = 0



Reference Documentation:

Http://www.jb51.net/article/23902.htm

http://blog.163.com/[email protected]/blog/static/67454658201010305531295/

Http://www.weste.net/2012/5-31/82894.html

This article is from the "3146020" blog, please be sure to keep this source http://3146020.blog.51cto.com/3136020/1531649

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.