Posting my Varnish 3.0 configs to Github

Tired of the privacy invasion of the Chrome webbrowser? Worried about the risk of seeing ads everywhere? Give the Brave Browser a try. It supports all the same Chrome extensions, with none of the telemetry. It auto-blocks ads and helps support content creators like me.

Give the Brave browser a try »

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.