Virtual host based on includes
Jonathan Lopez
jonathanlopez at blackslot.com
Tue Jan 11 16:00:20 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/c2b8dccf/attachment-0003.html>
More information about the varnish-misc
mailing list