-
Notifications
You must be signed in to change notification settings - Fork 188
/
haproxy.tmpl
50 lines (44 loc) · 1.51 KB
/
haproxy.tmpl
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
global
pidfile /var/run/haproxy.pid
stats socket /var/run/haproxy.sock mode 660 level admin expose-fd listeners
tune.ssl.default-dh-param 2048{{.ExtraGlobal}}
# disable sslv3, prefer modern ciphers
ssl-default-bind-options {{.SslBindOptions}}
ssl-default-bind-ciphers {{.SslBindCiphers}}
ssl-default-server-options {{.SslBindOptions}}
ssl-default-server-ciphers {{.SslBindCiphers}}
resolvers docker
{{- range .Resolvers}}
{{.}}
{{- end}}
defaults
mode http
balance roundrobin
{{.ExtraDefaults}}
option {{.ConnectionMode}}
option redispatch
errorfile 400 /errorfiles/400.http
errorfile 403 /errorfiles/403.http
errorfile 405 /errorfiles/405.http
errorfile 408 /errorfiles/408.http
errorfile 429 /errorfiles/429.http
errorfile 500 /errorfiles/500.http
errorfile 502 /errorfiles/502.http
errorfile 503 /errorfiles/503.http
errorfile 504 /errorfiles/504.http
maxconn 5000
timeout connect {{.TimeoutConnect}}s
timeout client {{.TimeoutClient}}s
timeout server {{.TimeoutServer}}s
timeout queue {{.TimeoutQueue}}s
timeout tunnel {{.TimeoutTunnel}}s
timeout http-request {{.TimeoutHttpRequest}}s
timeout http-keep-alive {{.TimeoutHttpKeepAlive}}s
{{.Stats}}
{{.UserList}}
frontend services{{.DefaultBinds}}
mode {{.DefaultReqMode}}
{{- if eq .DefaultReqMode "http" }}
option forwardfor
{{- end}}
{{.ExtraFrontend}}{{.ContentFrontend}}{{.ContentFrontendTcp}}{{.ContentFrontendSNI}}{{.ContentListen}}