Skip to content

Instantly share code, notes, and snippets.

@pedrocarrico
Created June 16, 2012 10:26
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pedrocarrico/2940921 to your computer and use it in GitHub Desktop.
Save pedrocarrico/2940921 to your computer and use it in GitHub Desktop.
Sample HAProxy configuration for testing in your local development environment
global
maxconn 4096
pidfile /tmp/haproxy-queue.pid
defaults
log global
mode http
timeout connect 300000
timeout client 300000
timeout server 300000
maxconn 2000
option redispatch
retries 3
option httpclose
option httplog
option forwardfor
option httpchk HEAD / HTTP/1.0
listen app localhost:8080
mode http
option tcplog
balance roundrobin
server app1 localhost:8081
server app2 localhost:8082
listen haproxyapp_admin:9100 127.0.0.1:9100
mode http
stats uri /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment