Skip to content

Instantly share code, notes, and snippets.

@tommybobbins
Created December 21, 2014 15:41
Show Gist options
  • Save tommybobbins/a4ca0a8b582228e913eb to your computer and use it in GitHub Desktop.
Save tommybobbins/a4ca0a8b582228e913eb to your computer and use it in GitHub Desktop.
HaProxy SSL
# this config needs haproxy-1.1.28 or haproxy-1.2.1
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#log loghost local0 info
maxconn 256
#chroot /usr/share/haproxy
user haproxy
group haproxy
daemon
#debug
#quiet
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
maxconn 2000
timeout connect 5000
timeout client 50000
timeout server 50000
frontend http-in
bind *:80
default_backend servers
frontend www-https
# bind *:80
bind *:443 ssl crt /etc/ssl/localcerts/apache_combo.pem
mode http
reqadd X-Forwarded-Proto:\ https
default_backend servers
backend servers
balance roundrobin
server server1 192.168.1.141:8004 maxconn 1
server server2 192.168.1.141:8005 maxconn 1
server server3 192.168.1.141:8006 maxconn 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment