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