Cyford Technologies LLC - Home | Atlanta I.T. Solutions

5 Website Development Tips To Boost Your Business Growth Exponentially

Load Balancing Named Virtual Hosts



How to setup load balancing on multiple websites with only 1 Public IP address available using HAProxy.

Some may wonder how you can host multiple websites on multiple servers when you only have 1 public ip address available it is simple.

We will first need to have linux setup and  configuired.  I have used Centos 5.4 in my example.


maxconn 4096
pidfile /var/run/
nbproc 2 # Number of processing cores. Dual Dual-core Opteron is 4 cores for example.

mode http
balance roundrobin
cookie SERVERID insert indirect
stats enable
option forwardfor    
retries 3
option redispatch
maxconn 20000
contimeout 50000
timeout client 500000
timeout server 500000
default_backend www

frontend Cyford
acl extranet hdr_end(host) -i
use_backend extranet if extranet
acl www hdr_end(host) -i    
use_backend www if www
default_backend www

backend www
stats enable
server CyfordWeb-0001-v1C  check
server CyfordWeb-0002-v1U  check

backend extranet
stats enable
server CyfordWeb-0001-v1C  check
server CyfordWeb-0002-v1U  check

 Updted and more complete instructions can be found here:

Published on: Mar 03, 2021

Categories: Web Development

    No Comments yet! Be the first one to write.

    Leave a Reply

    Your email address will not be published. Required fields are marked *