第 53 章 varnish - a state-of-the-art, high-performance HTTP accelerator

简介:

53.1. Varnish Install

http://varnish.projects.linpro.no/

  1. install

    				
    $ sudo apt-get install varnish
    				
    				
  2. /etc/default/varnish

    		    	
    $ sudo vim /etc/default/varnish
    DAEMON_OPTS="-a :80 \
                 -T localhost:6082 \
                 -f /etc/varnish/default.vcl \
                 -s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G"
    		    	
    		    	
  3. /etc/varnish/default.vcl

    			    
    $ sudo vim /etc/varnish/default.vcl
    
    backend default {
    	.host = "127.0.0.1";
    	.port = "8080";
    }
    			    
    			    
  4. reload

    				
    $ sudo /etc/init.d/varnish force-reload
     * Stopping HTTP accelerator				[ OK ]
     * Starting HTTP accelerator
    				
    		




原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

目录
相关文章
|
关系型数据库 PostgreSQL Ruby
HTTP 502: Whoops, GitLab is taking too much time to respond.
最近有台云上的服务器需要释放,然后上面跑的 gitlab 也要挪个地方,如在 docker 内运行,gitlab 镜像大约 1.56G,需占用 4G 以上的内存,因资源有限,于是借在其他的服务器上搭建环境(可用内存小于4G),然鹅启动的时候莫名出现 502,Excuse me?接着搜了一些 issue 博客上的解决方案(如修改端口、重启或 hup 某个服务)无果,后来在调整的过程中从日志里发现了一些信息。
11992 0
|
缓存 前端开发 安全
译|High-Performance Server Architecture(上)
译|High-Performance Server Architecture
58 0
|
存储 缓存 网络协议
译|High-Performance Server Architecture(下)
译|High-Performance Server Architecture(下)
74 0
005. how is RFC to backend determined - maintenance view IWFNDV_MGDEAM
005. how is RFC to backend determined - maintenance view /IWFND/V_MGDEAM Created by Wang, Jerry, last modified on Dec 26, 2014
005. how is RFC to backend determined - maintenance view IWFNDV_MGDEAM
SAP fiori backend determine cache setting
SAP fiori backend determine cache setting
110 0
SAP fiori backend determine cache setting
|
Web App开发
How to use Chrome HAR save HTTP performance
How to use Chrome HAR save HTTP performance
128 0
How to use Chrome HAR save HTTP performance
how is RFC to backend determined - maintenance view IWFNDV_MGDEAM
005. how is RFC to backend determined - maintenance view /IWFND/V_MGDEAM Created by Wang, Jerry, last modified on Dec 26, 2014
110 0
how is RFC to backend determined - maintenance view IWFNDV_MGDEAM
|
Web App开发 tengine 安全
Understanding HTTP/2: History, Features, Debugging, and Performance
HTTP/2 is an optimized transfer protocol over the previous version and offers various advantages, such as increased security, simplified development p.
2003 0