Skip to content

Instantly share code, notes, and snippets.

@maxpavlov
Created July 31, 2015 17:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxpavlov/e6b579e19f081e906ac9 to your computer and use it in GitHub Desktop.
Save maxpavlov/e6b579e19f081e906ac9 to your computer and use it in GitHub Desktop.
HAProxy with pass-trough ssl redirect via SNI
frontend http-frontend
bind 10.1.0.4:80
redirect scheme https if !{ ssl_fc }
frontend https-frontend
bind 10.1.0.4:443
option tcplog
mode tcp
acl is_local hdr_end(host) -i mirror.skbx.co
acl is_kiev hdr_end(host) -i kiev.skbx.co
use_backend kiev if is_kiev
default_backend wwwlocalbackend
backend wwwlocalbackend
mode tcp
server 1-www 127.0.0.1:443
backend kiev
mode tcp
server 1-www 10.8.0.6:443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment