-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhaproxy.cfg.template
38 lines (30 loc) · 1.04 KB
/
haproxy.cfg.template
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
global
daemon
maxconn {{global_maxconn}}
defaults
mode {{mode}}
timeout connect {{timeout_connect}}
timeout client {{timeout_client}}
timeout server {{timeout_server}}
frontend {{frontend_id}}
bind *:{{frontend_port}}
default_backend {{default_backend}}
backend {{default_backend}}
{% for id, backend in backends.iteritems() %}
server {{ id }} {{ backend.address }}:{{ backend.port }} maxconn {{ backend.maxconn }}
{% endfor %}
listen stats 0.0.0.0:9000 #Listen on all IP's on port 9000
mode http
balance
timeout client 5000
timeout connect 4000
timeout server 30000
#This is the virtual URL to access the stats page
stats uri /haproxy_stats
#Authentication realm. This can be set to anything. Escape space characters with a backslash.
stats realm HAProxy\ Statistics
#The user/pass you want to use. Change this password!
stats auth admin:password
#This allows you to take down and bring up back end servers.
#This will produce an error on older versions of HAProxy.
stats admin if TRUE