Last Updated: February 25, 2016
·
3.136K
· borisguery

Lint VCL (Varnish Configuration Language)

When improving your Varnish configuration it is safe to properly test your VCL before to restart/reload it.

The Varnish daemon comes with an handy option to test your VCL:

-C                           # print VCL code compiled to C language
-f file                      # VCL script

The following command will display to STDOUT your compiled configuration:

bguery@varnish:~$ varnishd -C -f /etc/varnish/default.vcl

Or warn for errors if any:

Message from VCC-compiler:
Expected ';' got '}'
(program line 112), at
('input' Line 44 Pos 3)
  }
--#


In director specification starting at:
('input' Line 27 Pos 1)
director apache_backends random {
########-------------------------

Running VCC-compiler failed, exit 1

VCL compilation failed