Virtual host based on includes

Jonathan Lopez jonathanlopez at blackslot.com
Tue Jan 11 11:22:28 CET 2011


Hello,

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/" req.http.host ".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: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110111/408695d1/attachment-0003.html>


More information about the varnish-misc mailing list