Skip to content

Instantly share code, notes, and snippets.

@tommybobbins
Created December 21, 2014 13:19
Show Gist options
  • Save tommybobbins/87acd39487d549d02da2 to your computer and use it in GitHub Desktop.
Save tommybobbins/87acd39487d549d02da2 to your computer and use it in GitHub Desktop.
HA Proxy configuration
# this config needs haproxy-1.1.28 or haproxy-1.2.1
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#log loghost local0 info
maxconn 256
#chroot /usr/share/haproxy
user haproxy
group haproxy
daemon
#debug
#quiet
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
srvtimeout 50000
frontend http-in
bind *:80
default_backend servers
backend servers
balance roundrobin
server server1 192.168.1.141:8004 maxconn 1
server server2 192.168.1.141:8005 maxconn 1
server server3 192.168.1.141:8006 maxconn 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment