Skip to content

Instantly share code, notes, and snippets.

@yuvadm
Created March 17, 2011 10:10
Show Gist options
  • Save yuvadm/874100 to your computer and use it in GitHub Desktop.
Save yuvadm/874100 to your computer and use it in GitHub Desktop.
A basic HAProxy configuration for a proxy server with stats
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#log loghost local0 info
maxconn 4096
#chroot /usr/share/haproxy
user haproxy
group haproxy
daemon
#debug
#quiet
stats socket /tmp/haproxy
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
srvtimeout 50000
listen web-proxy 0.0.0.0:80
mode http
balance roundrobin
server lb load.balancer.com
listen stats :1936
mode http
stats enable
stats hide-version
stats scope .
stats realm Haproxy\ Statistics
stats uri /
stats auth user:pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment