server {
listen 80;
server_name haix.admin671.com;
root /alidata/www/haix;
index index.html index.htm index.php;
server_name localhost;
location / {
try_files $uri $uri/ index.php;
}
location ~ ^.+\.php($|/) {
fastcgi_pass 127.0.0.1:9001;
fastcgi_index index.php;
if ($request_filename ~* (.*)\.php) {
set $php_url $1;
set $document_root$fastcgi_path_info $2;
}
if (!-f $php_url.php) {
return 404;
}
include fastcgi_params;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param sc
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
}
}
最佳答案
