server {
listen 80 ;
server_name xxx.test.cn localhost 127.0.0.1 115.29.96.222;
access_log /var/log/nginx/xxx.test.cn.access.log;
error_log /var/log/nginx/xxx.test.cn.error.log crit;
location / {
root /website/xxx.test.cn;
index index.php;
if (!-f $request_filename){
rewrite (.*) /index.php;
}
ssi on;
ssi_silent_errors on;
ssi_types text/shtml;
}
location ~ .php {
root /website/xxx.test.cn;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}