Virtual host based on includes

Jonathan Lopez jonathanlopez at
Wed Jan 12 16:08:46 CET 2011


I´m trying to create a main config file that includes an another file to the specific configuration for each virtual host, an example:

sub vcl_recv {

        set req.http.Host = regsub(req.http.Host, "^www\.", "");

        include "/etc/varnish/" ".vcl";


Then, each domain has a customized VCL in his own file.

Is this possible? I have tried everything but with no success. I don't want to make a huge if/else condition for each domain (virtual host).

Thanks a lot for your help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the varnish-misc mailing list