-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhaproxy.cfg
64 lines (59 loc) · 1.92 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
54
55
56
57
58
59
60
61
62
63
#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
nbproc 4
daemon
#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will
# use if not designated in their block
#---------------------------------------------------------------------
defaults
mode http
log global
option dontlognull
option httpclose
option httplog
option forwardfor
option redispatch
timeout connect 10000 # default 10 second time out if a backend is not found
timeout client 300000
timeout server 300000
maxconn 60000
retries 3
listen stats :8080
mode http
log global
maxconn 10
clitimeout 100s
srvtimeout 100s
contimeout 100s
timeout queue 100s
stats enable
stats hide-version
stats refresh 30s
stats show-node
stats auth admin:password
stats uri /haproxy?stats
#---------------------------------------------------------------------
# Listen webfarm
#---------------------------------------------------------------------
#listen webfarm 10.0.1.10:80
# mode http
# stats enable
# stats uri /stats
# stats realm HAProxy\ Statistics
# stats auth admin:P@szw03dz
# balance roundrobin
# cookie JSESSIONID prefix
# option httpclose
# option forwardfor
# option httpchk HEAD /check.txt HTTP/1.0
# server server1.yourserver.com 10.0.1.11:80 cookie A check
#server server2.yourserver.com 10.0.1.12:80 cookie B check