Multiple sites runing on multiple backends

Gašper Furman gasper.furman at delo.si
Wed Mar 7 15:24:40 CET 2012


Hi!

I would like to have one varnish server for multiple sites running on 
multiple backends.

For example:

Domains: domain0.com, domain1.com .. domain9.com running on backends: 
backendA, backendB.
Domains: domain10.com, domain11.com .. domain19.com running on backends: 
backendC, backendD.

Is there any better way than:

if (req.http.host ~ 
"(?i)domain0.com|(?i)domain1.com|(?i)domain2.com|(?i)domain3.com|(?i)domain4.com|(?i)domain5.com|(?i)domain6.com|(?i)domain7.com|(?i)domain8.com|(?i)domain9.com") 
{
    set req.backend = backendAB_director
}
else....

For example something like acl lists would be very helpful:

XXX domainsAB {
   "(?i)domain0.com";
   "(?i)domain1.com";
   "(?i)domain2.com";
   "(?i)domain3.com";
   "(?i)domain4.com";
   "(?i)domain5.com";
   "(?i)domain6.com";
   "(?i)domain7.com";
   "(?i)domain8.com";
   "(?i)domain9.com";
}

if (req.http.host ~ domainsAB) {
    set req.backend = backendAB_director
}

Thanks,
Regards,

-- 
Gašper Furman
Spletni razvoj
Web Development

Delo, d. d.
Dunajska 5, 1000 Ljubljana
T: +386 1 47 37 946
E: gasper.furman at delo.si <mailto:gasper.furman at delo.si>

<http://www.delo.si> <http://www.slovenskenovice.si> 
<http://www.deloindom.si> <http://www.polet.si> <http://www.pogledi.si>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120307/03817860/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mail_logotipi_si.jpg
Type: image/jpeg
Size: 4535 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120307/03817860/attachment-0005.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mail_logotipi_si3.jpg
Type: image/jpeg
Size: 4051 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120307/03817860/attachment-0006.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mail_logotipi_si2.jpg
Type: image/jpeg
Size: 5520 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120307/03817860/attachment-0007.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mail_logotipi_si4.jpg
Type: image/jpeg
Size: 2639 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120307/03817860/attachment-0008.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mail_logotipi_si5.jpg
Type: image/jpeg
Size: 1963 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120307/03817860/attachment-0009.jpg>


More information about the varnish-misc mailing list