Techyou labs
真正的爱应该超越生命的长度,心灵的宽度,灵魂的深度
常用标签

非动态页面,html文件,全部本地缓存。

server {
        listen 80 default;
        server_name  www.a.com;
    index index.php index.html index.htm;
    #root  /home/techyou/public_html/cdn.pagedns.com;
    #charset koi8-r;
    #include limit.conf;
    #limit_conn   one  5;
    #limit_rate  1m;
        open_file_cache max=2000 inactive=2h;
    open_file_cache_valid 3h;
    open_file_cache_errors off;
    #include location.conf;
    location / {
        #反向通用配置
        include proxy.conf;
        location ~ .*\.(js|css|gif|jpg|jpeg|png|bmp|swf|flv)$ {
        #缓存容器(针对虚拟机有效)
        proxy_cache cache_default;
        #backend source
        if ( !-e $request_filename){
            proxy_pass http://www.b.com;
        }
        expires 30d;
        }
        #backend source
        proxy_pass http://www.b.com;
        #include proxy upstream
        #include proxyupstream.conf;
    }
    #purge cache
    include purgecache.conf;
    access_log  off;
}
暂无评论

添加新评论