Created
August 15, 2014 16:05
-
-
Save stevepereira/ec82353c34e1d20d0dce to your computer and use it in GitHub Desktop.
HAPROXY SSL reference
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
log 127.0.0.1 local0 | |
log 127.0.0.1 local1 notice | |
maxconn 4096 | |
user haproxy | |
group haproxy | |
daemon | |
defaults | |
log global | |
mode http | |
option httplog | |
option dontlognull | |
option forwardfor | |
option http-server-close | |
stats enable | |
stats auth someuser:somepassword | |
stats uri /haproxyStats | |
frontend http-in | |
bind *:80 | |
reqadd X-Forwarded-Proto:\ http | |
default_backend application-backend | |
frontend https-in | |
bind *:443 ssl crt /etc/ssl/*ssl key* | |
reqadd X-Forwarded-Proto:\ https | |
default_backend application-backend | |
backend application-backend | |
redirect scheme https if !{ ssl_fc } | |
balance leastconn | |
option httpclose | |
option forwardfor | |
cookie JSESSIONID prefix | |
#enter the IP of your application here | |
server node1 10.0.0.1 cookie A check |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment