forked from nunofgs/docker-octoprint
-
Notifications
You must be signed in to change notification settings - Fork 1
/
haproxy.cfg
39 lines (34 loc) · 1008 Bytes
/
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
global
maxconn 4096
user haproxy
group haproxy
daemon
log 127.0.0.1 local0 warning
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
option http-server-close
option forwardfor
maxconn 2000
timeout connect 10s
timeout client 15min
timeout server 15min
frontend public
bind *:80
use_backend webcam1 if { path_beg /webcam1/ }
use_backend webcam2 if { path_beg /webcam2/ }
default_backend octoprint
backend octoprint
reqrep ^([^\ :]*)\ /(.*) \1\ /\2
option forwardfor
server octoprint1 127.0.0.1:5000
backend webcam1
reqrep ^([^\ :]*)\ /webcam1/(.*) \1\ /\2
server webcam1 127.0.0.1:8080
backend webcam2
reqrep ^([^\ :]*)\ /webcam2/(.*) \1\ /\2
server webcam2 127.0.0.1:8090