Skip to content

Instantly share code, notes, and snippets.

@dsdenes
Last active September 7, 2016 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsdenes/c1ab0c148b88afc138e43413bc8c3057 to your computer and use it in GitHub Desktop.
Save dsdenes/c1ab0c148b88afc138e43413bc8c3057 to your computer and use it in GitHub Desktop.
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
maxconn 100000
tune.ssl.default-dh-param 2048
nbproc 8
cpu-map 1 0
cpu-map 2 1
cpu-map 3 2
cpu-map 4 3
cpu-map 5 4
cpu-map 6 5
cpu-map 7 6
cpu-map 8 7
stats bind-process 1
defaults
log global
mode http
option httplog
option dontlognull
option forwardfor
option forceclose
option http-pretend-keepalive
timeout connect 5000
timeout client 50000
timeout server 50000
listen stats
bind :1936
mode http
stats enable
timeout connect 10s
timeout client 1m
timeout server 1m
stats hide-version
stats realm Haproxy\ Statistics
stats uri /
stats auth stats:stats
frontend http_front
bind :80
reqadd X-Forwarded-Proto:\ http
default_backend http_back
frontend https_front
bind :443 ssl crt /etc/ssl/private/00px.net.pem
reqadd X-Forwarded-Proto:\ https
default_backend http_back
backend http_back
balance roundrobin
server APP_PRIMARY_1 10.128.35.166:80 check
server APP_PRIMARY_2 10.128.36.157:80 check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment