Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
share|improve this question


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

The easy way is to:

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


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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.