varnish 5 and multiple domains

Admin Beckspaced admin at
Wed Oct 26 10:03:50 CEST 2016

dear varnish users ;)

i'm new to varnish and got a question about how to best implement 
multiple domains into varnish 5

i got quite a few domains hosted on my linux server and would like to 
include some domains, exclude others and also switch between different 
vcl's based on the domain.

i've looked around on the internet but thought why not ask the mailing 
list pro's for advice ;)

should i use the new load and label feature with version 5 as explained 

or should i use the include feature as explained here:


        if (req.http.Host == "") {
            include "/etc/varnish/";

or, instead of include, should i put all in a single vcl file?

sub vcl_recv {

if (req.http.Host == "")
    do some stuff;
  elsif (req.http.Host == "")
    do some stuff;


which approach would you recommend for multiple domains?

thanks for your hints & tips ;)

More information about the varnish-misc mailing list