求助军哥:为什么这个修改无效?【已解决】
错误描述:1,打开网页,页面提示不支持pathinfo2,类似 index.php/hellworld 会提示找不到页面
解决办法:1,修改nginx.conf的server{} 中的内容下:
75 # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
76 #
77 location ~ \.php {
78 root html;
79 fastcgi_pass 127.0.0.1:9000;
80 fastcgi_indexindex.php;
81 fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;
82 include fastcgi_params;
83 #pathinfo support
84 set $real_script_name $fastcgi_script_name;
85 set $path_info "";
86 if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$"){
87 set $real_script_name $1;
88 set $path_info $2;
89 }
90
91 fastcgi_param SCRIPT_NAME $real_script_name;
92 fastcgi_param PATH_INFO $path_info;
93
94 }
照着以上的教程修改了,还是无效。。。。。
烦请军哥来看下吧
:L自己搞定了
location ~ .*\.php
[ 本帖最后由 icidiq 于 2012-7-11 20:15 编辑 ]
页:
[1]