forked from dmitri-mcguckin/webcamd
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathhaproxy.cfg
More file actions
34 lines (29 loc) · 727 Bytes
/
haproxy.cfg
File metadata and controls
34 lines (29 loc) · 727 Bytes
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
maxconn 20000
log 127.0.0.1 local0
user haproxy
chroot /usr/share/haproxy
pidfile /run/haproxy.pid
daemon
defaults
timeout connect 5s
timeout client 1m
timeout server 1m
frontend public
bind :::80 v4v6
mode http
acl http ssl_fc,not
http-request redirect scheme https if http
frontend public_ssl
bind :::443 v4v6 ssl crt /etc/letsencrypt/live/both.pem
use_backend webcam if { path_beg /webcam/ }
default_backend octoprint
backend octoprint
mode http
http-request replace-uri '^([^\ :]*)\ /(.*)' '\1 /\2'
option forwardfor
server octoprint1 127.0.0.1:5000
backend webcam
mode http
http-request replace-uri '^([^\ :]*)\/webcam/(.*)$' '\1/\2'
server webcam 127.0.0.1:8089