Varnish round-robin loadbalancing with Virtualhost (Namebased)

Per Buer perbu at
Thu Aug 29 15:58:35 CEST 2013

Hi mate,

On Thu, Aug 29, 2013 at 3:17 PM, Tharanga Abeyseela <
tharanga.abeyseela at> wrote:

> (..)
> But how should i send host-headers to varnish to redirect to the correct
> server, This is always going to

You don't. :-)

You need to dispatch the request to the right backend in vcl_recv and have
the backend handle that host. You could start rewriting the host in
vcl_recv, but I would advise against it.

So, if you have two vhosts handled by "website" you just set that as the
backend in vcl_recv.

 <> *Per Buer*
CTO | Varnish Software AS
Phone: +47 958 39 117 | Skype: per.buer
We Make Websites Fly!

Winner of the Red Herring Top 100 Europe Award 2013
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the varnish-misc mailing list