Created
November 2, 2016 07:41
-
-
Save fang64/cabddca7e8bbe56fc86c26eed44ac3dd to your computer and use it in GitHub Desktop.
haproxy configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
maxconn 4096 | |
user haproxy | |
group haproxy | |
log 127.0.0.1 local1 debug | |
defaults | |
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 127.0.0.1 | |
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 127.0.0.1:5000 | |
backend webcam | |
reqrep ^([^\ :]*)\ /webcam/(.*) \1\ /\2 | |
server webcam1 127.0.0.1:8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment