user www www;
server{
listen 80;
server_name user.xjpay.biz;
root /home/data/wwwroot;
index index.html index.htm index.shtml index.php;
error_page 404 /404.html;
location = /500.html {
root /usr/index,html;
}
location / {
index index.htm index.html index.php;
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}
location ~ \.php/?.*$ {
root /home/data/wwwroot;
fastcgi_pass unix:/tmp/php-fpm.socket;
fastcgi_index index.php;
include fastcgi_params;
access_log logs/user.xxxx.cn.access.log main;
set $fastcgi_script_name2 $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+\.php)(/.+)$") {
set $fastcgi_script_name2 $1;
set $path_info $2;
}
fastcgi_param PATH_INFO $path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name2;
fastcgi_param SCRIPT_NAME $fastcgi_script_name2;
}
}
最佳答案
