-
Notifications
You must be signed in to change notification settings - Fork 0
/
haproxy.cfg
77 lines (69 loc) · 2.86 KB
/
haproxy.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 4096
user haproxy
group haproxy
daemon
#stats socket /usr/local/etc/haproxy/haproxysock level admin
tune.ssl.default-dh-param 2048
ssl-default-bind-ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
maxconn 2000
timeout connect 5000
timeout client 50000
timeout server 50000
default-server init-addr last,libc,none
resolvers docker
parse-resolv-conf
listen HAProxy-Statistics
bind 0.0.0.0:1936
mode http
option httplog
option httpclose
stats enable
stats uri /
stats refresh 20s
stats show-node
stats show-legends
stats show-desc OvR Load Balancer w/SSL Termination
stats auth ovrride:devPassword
frontend http
bind 0.0.0.0:80
http-request add-header X-Forwarded-Proto http
acl letsencrypt-acl path_beg /.well-known/acme-challenge/
redirect scheme https code 301 if !{ ssl_fc }
use_backend letsencrypt-backend if letsencrypt-acl
#default_backend nyc-backend
frontend https
bind 0.0.0.0:443 ssl crt /usr/local/etc/haproxy/certs/ no-sslv3
http-request add-header X-Forwarded-Proto https
http-request add-header X-Forwarded-Port 443
acl letsencrypt-acl path_beg /.well-known/acme-challenge/
acl host_lists hdr(host) -i lists.local.ovrride.com
#acl host_philly hdr(host) -i philly.ovrride.com
#acl admin path_beg /wp-admin/
#use_backend letsencrypt-backend if letsencrypt-acl
#use_backend nyc-backend if host_philly
#use_backend nyc-admin if admin
use_backend lists if host_lists
default_backend nyc-backend
backend letsencrypt-backend
#server letsencrypt 127.0.0.1:54321
#backend nyc-admin
#server web1 web:80 check fall 3 rise 2 weight 100
#server maintenance 10.132.69.229:81 check backup weight 1
backend nyc-backend
balance roundrobin
server web1 local_development-web-1:81 check fall 3 rise 2 weight 100
#server web2 10.132.154.80:80 check fall 3 rise 2 weight 100
#server maintenance 10.132.69.229:81 check backup weight 1
backend lists
balance roundrobin
server lists1 local_development-lists-1:81 check fall 3 rise 2 weight 100