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

1 Answer 1

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"
1
  • 2
    The correct command is ls *.vcl | awk '{printf "include \"%s\"\n", $1}' > .all_includes.vcl. You have to add , $1 to the printf. Jun 25, 2015 at 13:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .