Linux主机宝或纯环境开启PATHINFO的方法
ReLinux主机宝或纯环境开启PATHINFO的方法
麻烦高手给看看我的这个配置有什么问题吗?一直报502 Bad Gateway
server
{
listen 80;
server_name test.sup.cn;
index index.html index.htm index.php;
root /data/wwwroot/SuP;
access_log /data/wwwlogs/access_nginx.log combined;
location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}
location ~ \.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ '^(.+?\.php)(/.+)$') {
set $real_script_name $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
}
}
赞0
踩0