-
Notifications
You must be signed in to change notification settings - Fork 0
/
haproxy.example.cfg
42 lines (39 loc) · 1 KB
/
haproxy.example.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
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
user haproxy
group haproxy
daemon
defaults
log global
mode http
option httplog
option dontlognull
option http-server-close
option redispatch
timeout connect 5000
timeout http-keep-alive 15s
timeout server 50000
timeout client 50000
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
frontend http-in
bind *:80
mode http
acl my_domain_control hdr(host) -i my-domain.com
use_backend containers if my_domain_control
backend containers
mode http
balance roundrobin
option forwardfor
option httpchk get /
http-check expect ! rstatus ^5
default-server fall 1 rise 1
server container1 127.0.0.1:2070 observe layer7
server container2 127.0.0.1:2071 observe layer7