Posting my Varnish 3.0 configs to Github

Want to help support this blog? Try out Oh Dear, the best all-in-one monitoring tool for your entire website, co-founded by me (the guy that wrote this blogpost). Start with a 10-day trial, no strings attached.

We offer uptime monitoring, SSL checks, broken links checking, performance & cronjob monitoring, branded status pages & so much more. Try us out today!

Profile image of Mattias Geniar

Mattias Geniar, June 29, 2011

Follow me on Twitter as @mattiasgeniar

I’ve spent some time optimizing my own Varnish 3.0 VCL configuration files and have pushed them over to github so they can be reviewed/used by others too. They include:

  • A working template for WordPress
  • Server-Side URL rewriting
  • Clean error pages for debugging
  • Virtual Host implementations
  • Various header normalizations
  • Cookie manipulations

Some may argue with the “clean error page” for debugging purposes, but I find it useful to debug/print some of the internals of a Varnish request when I see fit. Here’s how it looks if you were to uncomment the error line in the conf.d/_wordpress-receive.vcl file.

I continue to refine those VCL configs and I’ll keep that github repository updated, so if you’re interested feel free to follow that repository and add any comments you may have.



Want to subscribe to the cron.weekly newsletter?

I write a weekly-ish newsletter on Linux, open source & webdevelopment called cron.weekly.

It features the latest news, guides & tutorials and new open source projects. You can sign up via email below.

No spam. Just some good, practical Linux & open source content.