Varnish Cache is a web application accelerator also known as a caching HTTP reverse proxy. You install it in front of any server that speaks HTTP and configure it to cache the contents.
By default, varnish comes configured in
/etc/conf.d/varnish to use localhost:8080 as the only backend:
VARNISHD_OPTS="-a 0.0.0.0:80 \ -b localhost:8080 \ -T localhost:6082 \ -s malloc,64M -u nobody -g nobody" VARNISH_CFG="/etc/varnish/default.vcl"
VARNISH_CFG file isn't loaded on varnish instalation nor service startup. So in case you want multiple backends from a VCL file, you need to edit
/etc/varnish/default.vcl with at least one backend and call:
$ /etc/rc.d/varnish reload
Manual VCL load
If the previous VCL configuration reload failed, try loading the VCL file manually:
- Connect to the varnish console:
$ varnishadm -T localhost:6082
- Load the default VCL. Make sure it has at least one backend:
varnish> vcl.load default /etc/varnish/default.vcl
- Make it active:
varnish> vcl.use default
- Start the child proccess (optional):