本文共 841 字,大约阅读时间需要 2 分钟。
目录
http://varnish.projects.linpro.no/
install
$ sudo apt-get install varnish
/etc/default/varnish
$ sudo vim /etc/default/varnishDAEMON_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.vclbackend default { .host = "127.0.0.1"; .port = "8080";}
reload
$ sudo /etc/init.d/varnish force-reload * Stopping HTTP accelerator [ OK ] * Starting HTTP accelerator