linux 环境配置

php-nginx.conf

2016-09-30  本文已影响0人  星星的简书
server{

        listen 80;
    server_name badminton.wxandcc.com;
    index index.php index.html index.htm ;

    root  /home/www/badminton;

    location / {
            if (!-e $request_filename){
                rewrite ^/(.*) /index.php last;
            }
    }

    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
             expires      30d;
    }

    location ~ .*\.(js|css)?$
    {
           expires      12h;
    }

    location ~ /\.
    {
         deny all;
    }

    access_log  /tmp/xxxx.log ;

    location ~ [^/]\.php(/|$)
    {
        try_files $uri =404;
        #fastcgi_pass  unix:/tmp/php-cgi.sock;
            fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
       include fastcgi.conf;
     }
}
上一篇 下一篇

猜你喜欢

热点阅读