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. 2018-2019-2 《网络对抗技术》 Exp1 PC平台逆向破解 20165215

    2018-2019-2 <网络对抗技术> Exp1 PC平台逆向破解 20165215 目录 知识点描述 实验步骤 (一)直接修改程序机器指令,改变程序执行流程 (二)通过构造输入参数,造 ...

  2. appium1.4版本,每次运行appium时需要安装unlock,setting文件的解决方法

    在使用appium执行自动化脚本时,首次运行脚本时会在手机中安装unlock,setting,inputmanager三个apk,以达到让appium控制app的目的,但是运行完一次之后,在OPPO, ...

  3. leetcode 66.加一 python3

    class Solution: def plusOne(self, digits): """ :type digits: List[int] :rtype: List[i ...

  4. windows下手动安装composer并配置环境变量

    windows下手动安装composer并配置环境变量   转载地址: https://my.oschina.net/7sites/blog/209997 之前发表过一篇如何为composer设置代理 ...

  5. sql的优化

    适当的索引 尽量不要有空判断的语句 尽量不要使用不等于条件 尽量不要使用or条件 尽量不要使用左右模糊查询 尽量使用exists代替in 尽量避免一次性返回大数据量

  6. 使用 Gradle 构建 Java 项目

    使用 Gradle 构建 Java 项目 这个手册将通过一个简单的 Java 项目向大家介绍如何使用 Gradle 构建 Java 项目. 我们将要做什么? 我们将在这篇文档航中创建一个简单的 Jav ...

  7. js中的所有鼠标事件 键盘事件

    https://www.cnblogs.com/torchstar/p/null.html

  8. LGOJ P3834 【模板】可持久化线段树 1(主席树)

    代码 #include <cstdio> #include <iostream> #include <algorithm> using namespace std; ...

  9. openwrt如何关掉防火墙?

    答: 1.  阻止防火墙服务开机自动启动 /etc/init.d/firewall disable 2. 关闭防火墙 /etc/init.d/firewall stop

  10. Python类元编程初探

    在<流畅的Python>一书中提到: Classes are first-class object in Python, so a function can be used to crea ...