Varnish: check your config before you restart!

If you’re using Varnish cache, you will be familiar with the “service varnish restart” then the “oh, there’s a config error and now all my sites are down!”.

Fear no more: there’s a command to check your Varnish syntax before you restart. Just run:

$ varnishd -Cf /etc/varnish/default.vcl

And it will tell you what’s wrong (or at least where the error is). If it prints out all your default.vcl, you’re good!


Related Posts

Force caching for a specific page in Varnish

Just a self-reminder, in the vcl_recv section (before sending request to the backend),...

Varnish stops file download after 60 seconds

The default installation of Varnish 3 on Debian-based system (including Ubuntu) will set...

Quick Contact Form