Re: Load balancing to name-based virtual hosts

From: Jeff Buchbinder <>
Date: Thu, 11 Dec 2008 14:06:21 -0500

David Rorex wrote:
> The simplest method would be to set up each server to respond to the
> same domain name. eg location1, location2, etc would all have the domain
> ' <>' set up. Then, a user requests
> <> from the haproxy load balancer,
> it gets randomly passed to one of the backends, which has no problem
> because it is set up to handle that name

Thanks. I already ended up implementing something like that, but had been looking for a way to do it on a per server basis (in the case that the vendor did not assign a common virtual host name to all servers). I just used this request rewrite line to do the mangling, in case anyone else needs it:

   reqrep ^(Host:\ )(.*) \

which would send the virtual host name "" with the HTTP request.

Jeffrey Buchbinder
Senior Infrastructure Engineer
Rave Wireless, Inc
M: 860 617 5750 Received on 2008/12/11 20:06

This archive was generated by hypermail 2.2.0 : 2008/12/11 20:15 CET