coffee_cn

博客园 首页 新随笔 联系 订阅 管理

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;
}
}

posted on 2015-01-29 16:56  coffee  阅读(271)  评论(0编辑  收藏  举报