With the popularity of DSL connection, an office or individual behind the Internet may have the similar setup.

  • Single public IP address ( to lookup)
  • Virtualization Managment with KVM and containers e.g. Proxmox, VirtualBox, VMware, etc
  • Registered Domain name e.g.
  • Range of web applications:
    • Project Management – Redmine (VM1)
    • EMail – Zimbra  (VM2)
    • CMS – Drupal (VM3)
    • ERP – ADempiere (VM4)


To provide external access to individual web applications using subdomain i.e. –> VM1


1. Install haproxy onto Proxmox host

apt-get install haproxy

2. Edit /etc/default/haproxy to enable init script to start haproxy

# Set ENABLED to 1 if you want the init script to start haproxy.
# Add extra flags here.
#EXTRAOPTS="-de -m 16"

3. Edit /etc/haproxy/haproxy.cfg to run on port 8080 (if default port 80 is already taken) and setting server redirction

# this config needs haproxy-1.1.28 or haproxy-1.2.1

log local0
log local1 notice
maxconn 4096
nbproc 4
user haproxy
group haproxy

log global
mode http
option httplog
option dontlognull
retries 3
contimeout 5000
clitimeout 50000
srvtimeout 50000
maxconn 2000
balance roundrobin
stats enable
stats uri /haproxy?stats

frontend haproxy


acl is_redmine hdr_end(host) -i
acl is_adempiere hdr_end(host) -i

use_backend redmine_servers if is_redmine

use_backend adempiere_servers if is_adempiere

backend redmine_servers

server redmine weight 1 maxconn 512 check

backend adempiere_servers
server adempiere weight 1 maxconn 512 check

High Availability Load Balancing using HAProxy
Tagged on: