PHP完全自学手册(珍藏版) 中文pdf扫描版下载
2、修改nginx配置文件,在SERVER段中添加如下代码:
location /index.php{ fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_param SCRIPT_FILENAME /home/wwwroot/index.php; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; include fcgi.conf; }
如果有多个应用,如:后台应用,可以多加一段以上代码,并修改相应入口文件:
location /admin.php{ fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_param SCRIPT_FILENAME /home/wwwroot/admin.php; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; include fcgi.conf; }
转载请注明:谷谷点程序 » 如何让nginx支持php的ci框架