global maxconn 4096 user haproxy group haproxy daemon log 127.0.0.1 local0 debug defaults log global mode http compression algo gzip option httplog option dontlognull retries 3 option redispatch option http-server-close option forwardfor maxconn 2000 timeout connect 5s timeout client 15m timeout server 15m frontend ingress bind *:8099 default_backend octoprint backend octoprint acl needs_scheme req.hdr_cnt(X-Scheme) eq 0 http-request set-header X-Forwarded-Proto https if { ssl_fc } http-request set-header X-Forwarded-Proto http if !{ ssl_fc } option forwardfor server octoprint1 127.0.0.1:5000 errorfile 503 /etc/haproxy/errors/503.http