目录
- 8.1. Varnish Install
- 8.2. varnish utility
-
- 8.2.1. status
- 8.2.2. varnishadm
-
- 8.2.2.1. 清除缓存
- 8.2.3. varnishtop
- 8.2.4. varnishhist
- 8.2.5. varnishsizes
- 8.3. log file
- 8.4. Varnish Configuration Language - VCL
-
- 8.4.1. unset / set
- 8.5. example
8.1. Varnish Install
http://varnish.projects.linpro.no/
-
install
$ sudo apt-get install varnish
-
/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"
-
/etc/varnish/default.vcl
$ sudo vim /etc/varnish/default.vcl backend default { .host = "127.0.0.1"; .port = "8080"; }
-
reload
$ sudo /etc/init.d/varnish force-reload * Stopping HTTP accelerator [ OK ] * Starting HTTP accelerator
原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。