SysAdmin, programming, technician & ideas.
Home About Docs Archive Project Map
Email Me
© 2020-2024 All rights reserved.
HAproxy sheme for proxmox
Scheme
example haproxy.cfg
frontend MAIN bind *:80 bind *:443 ssl crt /etc/haproxy/certs/ bind *:3000 bind *:8080 bind *:32400 http-request redirect scheme https unless { ssl_fc } use_backend web1 if { ssl_fc_sni $DOMAIN1.protolab.me } # content switching based on SNI use_backend web2 if { ssl_fc_sni $DOMAIN2.protolab.me } # content switching based on SNI use_backend web3 if { ssl_fc_sni $DOMAIN3.protolab.me } # content switching based on SNI use_backend web4 if { ssl_fc_sni $DOMAIN4.protolab.me } # content switching based on SNI acl web1_URL hdr(host) -i $DOMAIN1.protolab.me acl web2_URL hdr(host) -i $DOMAIN2.protolab.me acl web3_URL hdr(host) -i $DOMAIN3.protolab.me acl web4_URL hdr(host) -i $DOMAIN4.protolab.me backend web1 mode http balance roundrobin server web-esf 10.0.0.2:80 check server web-esg 10.0.0.3:80 check backend web2 mode http server web-est 10.0.0.4:80 backend web3 mode http server web-plex 10.0.0.5:32400/web backend web4 mode http server web-protolab 10.0.0.6:3000