• Varnish http缓存服务器


    http://blog.51cto.com/hexiaoshuai/1909183

    https://jefferywang.gitbooks.io/varnish_4_1_doc_zh/content/

    # This is an example VCL file for Varnish.
    #
    # It does not do anything by default, delegating control to the
    # builtin VCL. The builtin VCL is called when there is no explicit
    # return statement.
    #
    # See the VCL chapters in the Users Guide at https://www.varnish-cache.org/docs/
    # and http://varnish-cache.org/trac/wiki/VCLExamples for more examples.
    
    # Marker to tell the VCL compiler that this VCL has been adapted to the
    # new 4.0 format.
    vcl 4.0;
    
    # Default backend definition. Set this to point to your content server.
    backend phpmyadmin {
        .host = "48.57.222.83";
        .port = "8888";
        .probe = {
            .url = "/";
            .timeout = 1s;
            .interval = 5s;
            .window = 5;
            .threshold = 3;
        }
    }
    backend korea {
        .host = "121.65.111.199";
        .port = "8888";
    }
    
    
    sub vcl_recv {
        # Happens before we check if we have this in cache already.
        #
        # Typically you clean up the request here, removing cookies you don't need,
        # rewriting the request, etc.
        # unset req.http.cookie;
    
        if (req.http.host ~ "korea.sadprincess.com") {
            set req.backend_hint = korea;
        } elsif (req.http.host ~ "phpmyadmin.sadprincess.com") {
            set req.backend_hint = phpmyadmin;
        }
    
    }
    
    sub vcl_backend_response {
        # Happens after we have read the response headers from the backend.
        #
        # Here you clean the response headers, removing silly Set-Cookie headers
        # and other mistakes your backend does.
    }
    
    sub vcl_deliver {
        # Happens when we have all the pieces we need, and are about to send the
        # response to the client.
        #
        # You can do accounting or modifying the final object here.
    }
  • 相关阅读:
    JS之显式类型转换(最全)
    Python如何以两个字符一行方式输出"Hello World"
    封装localstorage为插件挂载到vue原型上
    封装localstorage 为方法
    input radio checkbox选中的c's's
    vue-插件 引用ali.JS,
    时间相加减
    mall-vue 门店版
    account.vue 以及continuePay.vue 通过action 里面的ajax后去支付
    service/axios.js
  • 原文地址:https://www.cnblogs.com/boundless-sky/p/10207508.html
Copyright © 2020-2023  润新知