下面是varnish配置安装文件:
##############################################################################
# Production varnish - front-end caching server
##############################################################################
[buildout]
varnish-parts =
pcre-build
varnish-build
varnish-config
# Configuration
# *************
[hosts]
varnish = localhost
varnish-backend = localhost
allow-purge = localhost
[ports]
varnish = 8100
varnish-backend = 8200
[downloads]
varnish = http://repo.varnish-cache.org/source/varnish-2.1.5.tar.gz
pcre = http://downloads.sourceforge.net/project/pcre/pcre/8.01/pcre-8.01.tar.gz
[varnish-options]
storage = malloc,128M
tuning =
[users]
varnish = nobody
# Recipes
# *******
[pcre-build]
recipe = hexagonit.recipe.cmmi
url = ${downloads:pcre}
[varnish-build]
recipe = hexagonit.recipe.cmmi
url = ${downloads:varnish}
environment =
PCRE_CFLAGS=-I${pcre-build:location}/include
PCRE_LIBS=-L${pcre-build:location}/lib -lpcre
[varnish-config]
recipe = collective.recipe.template
input = ${buildout:directory}/buildout.d/templates/varnish.vcl
output = ${buildout:directory}/etc/varnish.vcl配置varnish的模板文件:
[attach]30[/attach]
[attach]29[/attach]