aboutsummaryrefslogtreecommitdiffstats
path: root/terminaldweller.com/haproxy/haproxy.cfg
blob: 39a42d21d3d1c6bbb4ab6840f1c667d61f3f474e (plain) (blame)
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
global
log 127.0.0.1 local0
 
defaults
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
mode http

frontend http
bind *:80
acl blog-host hdr_sub(host) -i blog.terminaldweller.com
acl mail-host hdr_sub(host) -i mail.terminaldweller.com
acl api-host hdr_sub(host) -i api.terminaldweller.com

use_backend blog-backend if blog-host
use_backend mail-backend if mail-host
use_backend api-backend if api-host
default_backend blog-backend

backend blog-backend
mode http
option forwardfor
server blog-host 192.99.102.52:9000 check

backend mail-backend
mode http
option forwardfor
server mail-host 185.126.202.69:80 check

backend api-backend
mode http
option forwardfor
server api-host 192.99.102.52:8008 check