Skip to content

Instantly share code, notes, and snippets.

@danvideo
Forked from pedrocarrico/haproxy.cfg
Created December 19, 2016 21:42
Show Gist options
  • Save danvideo/b79244397c034651cbbfca129cd36835 to your computer and use it in GitHub Desktop.
Save danvideo/b79244397c034651cbbfca129cd36835 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