-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhaproxy.cfg
More file actions
52 lines (47 loc) · 1.51 KB
/
haproxy.cfg
File metadata and controls
52 lines (47 loc) · 1.51 KB
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
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 2048
user haproxy
group haproxy
daemon
stats socket /var/lib/haproxy/stats
tune.ssl.default-dh-param 2048
defaults
mode http
log global
option httplog
option dontlognull
option http-server-close
option forwardfor except 127.0.0.0/8
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 4096
stats enable
stats uri /haproxy-status
frontend http-downstream
bind *:80
http-request add-header X-Forwarded-Proto http
default_backend http-upstream
frontend https-downstream
bind *:443 ssl crt /etc/pki/tls/private/haproxy.pem
http-request add-header X-Forwarded-Proto https
default_backend https-upstream
backend http-upstream
balance roundrobin
option httpchk
server web-1 web-1:80 check
server web-2 web-2:80 check
backend https-upstream
balance roundrobin
option httpchk
server web-1 web-1:443 check check-ssl ssl verify required ca-file /etc/pki/tls/certs/ca.pem
server web-2 web-2:443 check check-ssl ssl verify required ca-file /etc/pki/tls/certs/ca.pem