error_log /var/log/nginx/renren.err.log;
server {
listen 80;
server_name test.com *.test.com;
charset utf-8;
access_log /var/log/nginx/renren.log main;
location / {
root/www/web/test_com/public_html;
indexindex.html index.htm index.php;
#路由重写
rewrite "^/Payment/wapAlipayReturn.html$" /index.php?m=Payment&a=wapAlipayReturn last;
rewrite "^/Payment/wapAlipayNotify.html$" /index.php?m=Payment&a=wapAlipayNotify last;
if (!-e $request_filename) {
rewrite . /index.php last;
}
}
error_page 400 /errpage/400.html;
error_page 403 /errpage/403.html;
error_page 404 /errpage/404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
root /www/web/test_com/public_html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}