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
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to