Virtual host based on includes
Jonathan Lopez
jonathanlopez at blackslot.com
Wed Jan 12 16:08:46 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/20110112/c69bd815/attachment-0003.html>
More information about the varnish-misc
mailing list