How to configure HA Proxy on domain base


Hi all,

I have following problem:

Host Ubuntu 14.04 desktop
VMs Ubuntu 14.04 desktop/server edition

I have several web-servers running on VMs, each with its own domain/subdomain and internal IP address. But I have only one Fixed IP/External IP.

On googling I found HA Proxy and I suppose it can solve my problem. I’m now searching for steps/document how to configure it on domain base?

Besides can I install HA Proxy on a VM instead of on the Host. Because I expect retain the latter clean solely for running VirtualBox. Thanks



Hi satimis,

Yes, HAProxy can take routing decisions based on domain name (or any part of the HTTP protocol).
Please read this blog article:

And yes, you can run HAProxy into a virtualbox VM. From a performance point of view, this is not recommended. It’s acceptable for less than 1k req/s.