server {
    listen       80;
    
    server_name  127.0.0.1 ;
    index index.html index.htm index.php;
    root  /data/sanguobw/server_all/zone/sanguobw_test_2/www;
    #autoindex on;
    charset utf-8;
    #expires off;
    access_log off;

    location ~.*\.(swf|xml|mp3|png|jpg|gif|data)$ {
        expires       max;
    }
    location ~.*\.(css|js|mx)$ {
        expires       96h;
    }
    location ~ /.svn/ {
        deny all;
    }
    location ~ .php { # 为了支持pathinfo，需将包含.php的URL交给fastcgi解析，同时需设置php.ini中的cgi.fix_pathinfo=1
        expires off;
        #access_log off;
        access_log  /data/logs/127.0.0.1.log;

        include fastcgi.conf;
        fastcgi_pass  127.0.0.1:10080;
        fastcgi_index index.php;
        fastcgi_param ROOT /data/sanguobw/server_all/zone/sanguobw_test_2; # 这个环境变量需传入，否则web系统无法正常工作
        fastcgi_param PATH_INFO $fastcgi_script_name;
    }
}
