CrazyNotes 2018-12-08
HaproxyHandleMultipleDomainandSSL
global
maxconn400
defaults
modehttp
timeoutconnect30000
timeoutclient50000
timeoutserver50000
statsenable
statshide-version
statsuri/stats
statsauthadmin:admin
frontendwebapp
bind*:80
bind*:443sslcrt/tool/haproxy-1.8.14/conf/sillycatname.pemcrt/tool/haproxy-1.8.14/conf/kikokangname.pem
aclhost_sillycathdr_dom(host)-isillycat111.ddns.net
aclhost_kikokanghdr_dom(host)-ikikokang111.ddns.net
redirectschemehttpsif!{ssl_fc}
use_backendgrav-webifhost_sillycat
use_backendflarum-webifhost_kikokang
backendgrav-web
balanceroundrobin
optionhttpclose
optionforwardfor
http-requestset-headerX-Forwarded-Port%[dst_port]
http-requestadd-headerX-Forwarded-Protohttpsif{ssl_fc}
servergrav-web1192.168.1.108:8081cookieAcheck
backendflarum-web
balanceroundrobin
optionhttpclose
optionforwardfor
http-requestset-headerX-Forwarded-Port%[dst_port]
http-requestadd-headerX-Forwarded-Protohttpsif{ssl_fc}
serverstatic-web1192.168.1.108:8082cookieAcheck
listenscrapyd
bind*:6800
modetcp
balanceroundrobin
serverscrapyd1xxxxxxxxx:6801check
serverscrapyd2xxxxxxxxx:6802check
References:
https://gist.github.com/urodoz/d7796cec6d47566439ba3d8ecce962f1