Varnish Configuration Templates (boilerplate)
🚀 Need help implementing Varnish?
You can still use Varnish 3 of course, but there will be no more security or bug fixes to the Varnish 3.x release. It's probably wise to focus your Varnish adventures on the new varnish 4 VCL config template.
You can use the configuration templates found in this repository to quickly get started with a complete Varnish configuration that offers support for most functionality. Start of by looking into "production.vcl" and taking the bits you need, copy it to your own default.vcl.
What is it?
A set of configuration samples used for Varnish 3.0. This includes templates for:
- Drupal (works decently for Drupal 7, depends on your addons obviously)
- Joomla (WIP)
- Fork CMS
And various configuration for:
- Server-side URL rewriting
- Clean error pages for debugging
- Virtual Host implementations
- Various header normalizations
- Cookie manipulations
- 301/302 redirects from within Varnish
Common list of errors and their fixes:
- FetchError http first read error: -1 11 (Resource temporarily unavailable)
- FetchError: straight insufficient bytes
- FetchError: Gunzip+ESI Failed at the very end
- Test if your Varnish VCL compiles and Varnish starts
- See which cookies are being stripped in your VCL
- Reload Varnish VCL without losing cache data
- Combine Apache'S HTTP authentication with Varnish IP whitelisting