-
Notifications
You must be signed in to change notification settings - Fork 0
/
haproxy.cfg.bak
53 lines (41 loc) · 1.55 KB
/
haproxy.cfg.bak
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
global
daemon
maxconn 256
defaults
mode http
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
frontend router
bind *:80
acl www_in hdr_beg(host) www.
acl www_in hdr_beg(host) www-dev.
acl www_in hdr_beg(host) www-qa.
acl frontend.service hdr(host) -i frontend.service
acl backend.service hdr(host) -i backend.service
acl env_prod hdr_beg(host) www.
acl env_dev hdr_beg(host) www-dev.
acl env_qa hdr_beg(host) www-qa.
acl env_prod hdr(x-mayfly) -i prod
acl env_dev hdr(x-mayfly) -i dev
acl env_qa hdr(x-mayfly) -i qa
reqadd x-mayfly:\ prod if www_in env_prod
reqadd x-mayfly:\ dev if www_in env_dev
reqadd x-mayfly:\ qa if www_in env_qa
use_backend frontend.service_prod if env_prod www_in
use_backend frontend.service_dev if env_dev www_in
use_backend frontend.service_prod if env_qa www_in
use_backend frontend.service_prod if env_prod frontend.service
use_backend frontend.service_dev if env_dev frontend.service
use_backend frontend.service_prod if env_qa frontend.service
use_backend backend.service_prod if env_prod backend.service
use_backend backend.service_dev if env_dev backend.service
use_backend backend.service_dev if env_qa backend.service
backend frontend.service_prod
server server1 host1.internal:5000 maxconn 32
backend backend.service_prod
server server1 host1.internal:6000 maxconn 32
backend frontend.service_dev
server server1 host1.internal:5001 maxconn 32
backend backend.service_dev
server server1 host1.internal:6001 maxconn 32