Hi,
I have to work with a lot of domain names in my varnish config and I was
wondering if there is an easier to way to match the hostname other than a
series of if statements. Is there anything like a hash? Or does anybody
have any C code to do this?
example pseudo code:
=================================
vcl_recv(){
if(req.http.host == "www.domain1.com")
{
set req.backend = www_domain1_com;
# more code
return(lookup);
}
if(req.http.host == "www.domain2.com")
{
set req.backend = www_domain2_com;
# more code
return(lookup);
}
if(req.http.host == "www.domain3.com")
{
set req.backend = www_domain3_com;
# more code
return(lookup);
}
}
=================================
Thank you,
Paul
_______________________________________________
varnish-misc mailing list
[email protected]
http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc