4

After googling and briefly browsing varnish docs, I could not find a reference to this. Can I do for example the following in varnish vcl?

include sites-enabled/*.vcl
Petri
  • 141
  • 2

1 Answers1

5

No.

But as phk said, you can use the following trick :

https://www.varnish-cache.org/lists/pipermail/varnish-misc/2013-February/022794.html

The easy way is to:

cd directory
ls *.vcl | awk '{printf "include \"%s\"\n"}' > .all_includes.vcl

Then

include "directory/.all_includes.vcl"
  • 2
    The correct command is `ls *.vcl | awk '{printf "include \"%s\"\n", $1}' > .all_includes.vcl`. You have to add `, $1` to the printf. – Kevin Robatel Jun 25 '15 at 13:11