-
Notifications
You must be signed in to change notification settings - Fork 3
/
haproxy.cfg
53 lines (46 loc) · 1.38 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
global
daemon
pidfile /var/run/haproxy.pid
user haproxy
group haproxy
log 127.0.0.1 local0
maxconn HAPROXY_GLOBAL_MAX_CONNECTIONS
defaults
mode http
log global
balance roundrobin
maxconn HAPROXY_DEFAULTS_MAX_CONNECTIONS
option httplog
option dontlognull
option forwardfor
option http-server-close
option abortonclose
option redispatch
retries HAPROXY_DEFAULTS_RETRIES
timeout http-request HAPROXY_DEFAULTS_TIMEOUT_HTTP_REQUEST
timeout client HAPROXY_DEFAULTS_TIMEOUT_CLIENT
timeout connect HAPROXY_DEFAULTS_TIMEOUT_CONNECT
timeout server HAPROXY_DEFAULTS_TIMEOUT_SERVER
timeout queue HAPROXY_DEFAULTS_TIMEOUT_QUEUE
timeout http-keep-alive HAPROXY_DEFAULTS_TIMEOUT_HTTP_KEEP_ALIVE
option httpchk HAPROXY_DEFAULTS_OPTION_HTTPCHK
timeout check HAPROXY_DEFAULTS_TIMEOUT_CHECK
listen stats
bind *:HAPROXY_STATS_PORT
monitor-uri HAPROXY_DEFAULTS_MONITOR_URI
stats HAPROXY_STATS_ENABLE
stats uri HAPROXY_STATS_URI
stats realm HAPROXY_STATS_REALM
stats auth HAPROXY_STATS_USERNAME:HAPROXY_STATS_PASSWORD
frontend http-in
bind *:80
reqadd X-Forwarded-Proto:\ http
capture request header Host len 32
default_backend servers
frontend https-in
bind *:443 ssl crt /etc/ssl/certs/server.crt
reqadd X-Forwarded-Proto:\ https
capture request header Host len 32
default_backend servers
backend servers
redirect scheme https if !{ ssl_fc }