initial commit
This commit is contained in:
57
loadbalancer/haproxy.cfg
Normal file
57
loadbalancer/haproxy.cfg
Normal file
@@ -0,0 +1,57 @@
|
||||
global
|
||||
log stdout format raw local0 debug
|
||||
defaults
|
||||
mode http
|
||||
option redispatch
|
||||
option http-server-close
|
||||
log global
|
||||
timeout connect 5s
|
||||
timeout client 24h
|
||||
timeout server 24h
|
||||
option srvtcpka
|
||||
option clitcpka
|
||||
|
||||
frontend default
|
||||
|
||||
bind :80 accept-proxy
|
||||
mode http
|
||||
option httpclose
|
||||
option httplog
|
||||
http-request add-header X-Forwarded-For %[src]
|
||||
|
||||
acl letsencrypt path_beg /.well-known/acme-challenge/
|
||||
use_backend letsencrypt if letsencrypt
|
||||
|
||||
default_backend backend-default
|
||||
|
||||
backend letsencrypt
|
||||
server letsencrypt letsencrypt:80 send-proxy
|
||||
|
||||
backend backend-default
|
||||
mode http
|
||||
option httplog
|
||||
#option log-health-checks
|
||||
option redispatch
|
||||
log global
|
||||
balance roundrobin
|
||||
server backend-1 smarthostbackend-1:80 check send-proxy
|
||||
server backend-2 smarthostbackend-2:80 check send-proxy
|
||||
|
||||
frontend default_https
|
||||
|
||||
bind :443 accept-proxy
|
||||
mode tcp
|
||||
option forwardfor
|
||||
option tcplog
|
||||
option dontlognull
|
||||
|
||||
default_backend backend_default_https
|
||||
backend backend_default_https
|
||||
mode tcp
|
||||
option tcplog
|
||||
# option log-health-checks
|
||||
# option redispatch
|
||||
log global
|
||||
balance roundrobin
|
||||
server backend-1 smarthostbackend-1:443 check send-proxy
|
||||
server backend-2 smarthostbackend-2:443 check send-proxy
|
Reference in New Issue
Block a user