-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhaproxy.conf
66 lines (56 loc) · 1.92 KB
/
haproxy.conf
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
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 10000
user haproxy
group haproxy
daemon
tune.ssl.default-dh-param 2048
# turn on stats unix socket
stats socket /var/lib/haproxy/stats
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 10000
#---------------------------------------------------------------------
# main frontend which proxys to the backends
#---------------------------------------------------------------------
frontend frontend
mode http
bind *:80
#bind *:443 ssl crt /etc/haproxy/certs/haproxy.gsviec.com.pem
#redirect scheme https if !{ ssl_fc }
acl letsencrypt-acl path_beg /.well-known/acme-challenge/
use_backend letsencrypt-backend if letsencrypt-acl
acl host_gsviec hdr_end(host) -i let-haproxy.gsviec.com
use_backend gsviec if host_gsviec
default_backend gsviec
backend gsviec
balance leastconn
option httpclose
option forwardfor
cookie JSESSIONID prefix
server node1 127.0.0.1:8000 cookie A check
backend letsencrypt-backend
server letsencrypt 127.0.0.1:8888 check
#---------------------------------------------------------------------
# round robin balancing between the various backends
#---------------------------------------------------------------------
listen stats
bind *:9090
stats enable
stats uri /