Skip to content

Instantly share code, notes, and snippets.

@fang64 fang64/haproxy.cfg
Created Nov 2, 2016

What would you like to do?
haproxy configuration
maxconn 4096
user haproxy
group haproxy
log local1 debug
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
option http-server-close
option forwardfor
maxconn 2000
timeout connect 5s
timeout client 15min
timeout server 15min
frontend public
bind :::80 v4v6
bind :::443 v4v6 ssl crt /etc/ssl/snakeoil.pem
option forwardfor except
use_backend webcam if { path_beg /webcam/ }
default_backend octoprint
errorfile 503 /etc/haproxy/errors/503-no-octoprint.http
backend octoprint
reqrep ^([^\ :]*)\ /(.*) \1\ /\2
#reqadd X-Scheme:\ https if { ssl_fc }
option forwardfor
server octoprint1
backend webcam
reqrep ^([^\ :]*)\ /webcam/(.*) \1\ /\2
server webcam1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.