-
Notifications
You must be signed in to change notification settings - Fork 10
/
haproxy.cfg
35 lines (28 loc) · 1.04 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
global
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
defaults
mode http
timeout connect 100000
timeout client 1000000
timeout server 1000000
listen http-in
option forwardfor
option http-server-close
bind *:80
bind *:443 ssl crt /etc/haproxy/profireader_haproxy.key.pem
redirect scheme https code 301 if !{ ssl_fc } { hdr(host) -i profireader.com }
redirect scheme https code 301 if !{ ssl_fc } { hdr(host) -i file001.profireader.com }
redirect scheme https code 301 if !{ ssl_fc } { hdr(host) -i static.profireader.com }
server profi 127.0.0.1:8080
use-server profi if { hdr(host) -i profireader.com }
server static 127.0.0.1:9000
use-server static if { hdr(host) -i static.profireader.com }
server fileserver 127.0.0.1:9001
use-server fileserver if { hdr(host) -i file001.profireader.com }
server front 127.0.0.1:8888
use-server front if { always_true }