Skip to content

Instantly share code, notes, and snippets.

@schleg
Last active August 29, 2015 14:08
Show Gist options
  • Save schleg/4d680c8ba6ae85aa2216 to your computer and use it in GitHub Desktop.
Save schleg/4d680c8ba6ae85aa2216 to your computer and use it in GitHub Desktop.
Docker Host HAProxy Config
# /etc/haproxy/haproxy.cfg
global
daemon
maxconn 4096
defaults
mode http
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
frontend http-in
bind *:80
bind *:443 ssl crt /etc/ssl/private/$(PEM).pem
acl is_$(BACKEND) hdr_end(host) -i $(HOST)
use_backend $(BACKEND) if is_$(BACKEND)
backend $(BACKEND)
balance roundrobin
option httpclose
option forwardfor
server $(SERVER_NAME) $(CONTAINER_IP):$(CONTAINER_PORT) maxconn 32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment