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 = "";
.probe = {
.url = "/";
.timeout = 1s;
.interval = 5s;
.window = ;
.threshold = ;
}
}
backend korea {
.host = "121.65.111.199";
.port = "";
} 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.
}

Varnish http缓存服务器的更多相关文章

  1. Linux平台部署varnish 高性能缓存服务器

    一:varnish部署前准备: 1.1相关软件以及系统,web服务 系统要求:Centos 6(以上) (64位) 相关中间件:varnish-4.0.2 1.2相关系统依赖包安装检查准备 1.2.1 ...

  2. varnish代理缓存服务器的安装与使用

    1. 下载解压 cd /usr/local/src/ wget https://codeload.github.com/varnishcache/varnish-cache/zip/master ch ...

  3. 利用varnish做Discuz论坛的缓存服务器

    实验背景:公司有一台BBS服务器,用的是LNMP的架构搭建的.正好手头有一台空闲的虚拟机,于是想着给BBS前端加一台缓存服务器.于是选定了varnish,搜了很多教程,跌跌撞撞的完成了配置.这其中很多 ...

  4. Varnish缓存服务器的搭建配置手册

    Varnish缓存服务器的搭建配置手册 1.Varnish官方环境依赖提示 Installing Varnish Cache is as simple as enabling our package ...

  5. 高性能缓存服务器Varnish

    一.Varnish概述 Varnish是一款高性能的.开源的反向代理服务器和缓存服务器,计算机系统的除了有内存外,还有CPU的L1.L2,甚至L3级别的缓存,Varnish的设计架构就是利用操作系统的 ...

  6. Varnish,Nginx搭建缓存服务器

    Varnish,Nginx搭建缓存服务器 一. varnish 1.安装pcre库,兼容正则表达式 # tar -zxvf pcre-8.10.tar.gz # cd pcre-8.10 # ./co ...

  7. web缓存服务器varnish-4.1.6的部署及配置详解

    web缓存服务器varnish-4.1.6的部署及配置详解 1.安装varnish4.1.6安装依赖 yum install -y autoconf automake jemalloc-devel l ...

  8. varnish页面缓存服务

    varnish页面缓存服务 https://www.cnblogs.com/L-dongf/p/9310144.html http://blog.51cto.com/xinzong/1782669 阅 ...

  9. RHEL 6.5----Varnish缓存服务器

    主机名 IP  服务  master  192.168.30.130   varnish   slave  192.168.30.131  httpd WebServer   192.168.30.1 ...

随机推荐

  1. Linux实战

    1.root用户无法删除文件 [root@VM_0_9_centos .ssh]# lsattr authorized_keys ----i----------- authorized_keys ls ...

  2. Python 较为完善的猜数字游戏

    import random def guess_bot(): bot = random.randint(1, 100) # time = int(input("你觉得能猜对需要的次数:&qu ...

  3. HashMap 和 Hashtable 的 6 个区别,一般人不知道最后一条

    1.线程安全 Hashtable 是线程安全的,HashMap 不是线程安全的. 为什么说 HashTable 是线程安全的? 来看下 Hashtable 的源码,Hashtable 所有的元素操作都 ...

  4. debugging kubernetes (Delve and Goland)

    1. Build from source cd GOPATH mkdir k8s.io cd k8s.io git clone https://github.com/kubernetes/kubern ...

  5. React 列表页面传递参数

    React 列表进入详情页面 首先安装 react-router-dom (4.0) npm/yarn install react-router-dom 路由跳转配置 列表 父组件 this.prop ...

  6. json与bson区别

    bson是由10gen开发的一个数据格式,目前主要用于mongoDB中,是mongoDB的数据存储格式.bson基于json格式,选择json进行改造的原因主要是json的通用性及json的schem ...

  7. JS制作蔡徐坤打篮球小游戏(鸡你太美?)

    一.前提: 和我之前写的 QT小球游戏 差不多(指的是实现方法). 感谢大佬的 Github:https://github.com/kasuganosoras/cxk-ball 外加游戏网页:http ...

  8. Python使用LDAP做用户认证

    LDAP(Light Directory Access Portocol)是轻量目录访问协议,基于X.500标准,支持TCP/IP. LDAP目录以树状的层次结构来存储数据.每个目录记录都有标识名(D ...

  9. java和js中int和String相互转换常用方法整理

    java中int和String的相互转换常用的几种方法: int  > String int i=10;String s="";第一种方法:s=i+""; ...

  10. pycharm 序列号/行号 的宽度太宽了如何调整

    问题:行号宽度嫌宽: 解决:在settings里面,如下图顺序,取消“show gutter icons”的勾,即可. 调整后如下图: