Set up varnish and varnish logging
This version only supports varnish 3.x.
This package also doesn’t provide all the features of plone.recipe.varnish, since it’s designed to be used slightly differently. Using this recipe you have one varnish daemon per deployed backend application server. If you have three different applications on a server, you will run three varnish daemons. This means they can be separately deployed, configured and maintained. This also means there is no need for host-header based routing.
Note that this package provides no support for installing varnish. Use the binary provided by your OS, or use zc.recipe.cmmi perhaps.
The key differences are:
- This packages uses isotoma.recipe.gocaptain to write the start/stop scripts, so it’s more likely to play well with your OS and behaves more normally
- Support for a separate logging system with each varnish instance, again using GoCaptain
- A different (and arguably more sane) basic varnish configuration
- Easy support for custom templates
A recipe for this package would look something like:
[varnish] recipe = isotoma.recipe.varnish name = mysite bind = 127.0.0.1:8080 backends = 127.0.0.1:9000 varnishlog = /usr/bin/varnishncsa logfile = /var/log/varnish/mysite.log
This would create two start scripts in your bin directory: varnish and varnishlog. The log instance will only log activity for this varnish instance.
Copyright 2010 Isotoma Limited
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Add a new varnishctl wrapper that allows for graceful reload of varnish configuration.
To test a new VCL change without interrupting your site you can:
To load a new VCL change without disrupting your site you can: