Varnish round-robin loadbalancing with Virtualhost (Namebased)
Tharanga Abeyseela
tharanga.abeyseela at gmail.com
Thu Aug 29 15:17:48 CEST 2013
Hi,
i'm using namebased virtual hosting for 2 web servers, and i need to do the
round-robin loadbalancing
using varnish. my config as follows
backend website {
.host = "xxx.com";
.port = "8080";
}
backend api {
.host = "yyy.com";
.port = "8080";
}
director clust round-robin {
{ .backend = api; }
{ .backend = website; }
}
sub vcl_recv {
set req.backend = clust;
if (req.request)
{
return(pass);
}
}
But how should i send host-headers to varnish to redirect to the correct
server, This is always going to xxx.com.
Thanks in advance
Tharanga
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20130829/a8f1dea5/attachment.html>
More information about the varnish-misc
mailing list