5,655
社区成员
发帖
与我相关
我的任务
分享
server {
listen 80;
server_name www.xxx.com;
access_log /var/log/nginx/qhq/qhq_bool_tmp_access.log main;
error_log /var/log/nginx/qhq/qhq_bool_tmp_error.log debug;
set $web_root /home/a;
location ^~ /v3/ {
alias /home/b/;
index index.html index.htm index.php;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}
}
location / {
root $web_root;
index index.html index.htm index.php;
if (!-f $request_filename) {
rewrite (.*) /index.php last;
}
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root $web_root;
}
location ~ \.php$ {
root $web_root;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $web_root/$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
}