php-nginx.conf

作者: 星星的简书 | 来源:发表于2016-09-30 15:06 被阅读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;
     }
}

相关文章

网友评论

    本文标题:php-nginx.conf

    本文链接:https://www.haomeiwen.com/subject/ffzlyttx.html