Skip to content

Instantly share code, notes, and snippets.

@Ne00n
Created October 16, 2019 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ne00n/b52e112afa5d587178920e0164691083 to your computer and use it in GitHub Desktop.
Save Ne00n/b52e112afa5d587178920e0164691083 to your computer and use it in GitHub Desktop.
HAProxy SNI TLS + HTTP
frontend https
bind :443
mode tcp
acl tls req.ssl_hello_type 1
tcp-request inspect-delay 5s
tcp-request content accept if tls
#Define hosts
acl host_nano.test.com_https req.ssl_sni -i nano.test.com
use_backend nano.test.com_https if host_nano.test.com_https
backend nano.test.com_https
server nano.test.com 10.10.1.20:443
mode tcp
frontend http
bind :80
mode http
#Define hosts
acl host_nano.test.com hdr(host) -i nano.test.com
use_backend nano.test.com if host_nano.test.com
backend nano.test.com
server nano.test.com 10.10.1.20:80
mode http
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment