Guest User

Untitled

a guest
Mar 19th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. bind :443 ssl crt /etc/ssl/haproxy.pem
  2.  
  3. acl is_static hdr_end(Host) -i example.com
  4. acl is_api hdr_end(Host) -i api.example.com
  5. acl is_files hdr_end(Host) -i example.io
  6.  
  7. redirect scheme https if !{ ssl_fc } is_static is_api
  8.  
  9. cat cert1.pem key1.pem > haproxy1.pem
  10. cat cert2.pem key2.pem > haproxy2.pem
  11.  
  12. defaults
  13. log 127.0.0.1 local0
  14. option tcplog
  15.  
  16. frontend ft_test
  17. mode http
  18. bind 0.0.0.0:443 ssl crt /certs/haproxy1.pem crt /certs/haproxy2.pem
  19. use_backend bk_cert1 if { ssl_fc_sni my.example.com } # content switching based on SNI
  20. use_backend bk_cert2 if { ssl_fc_sni my.example.org } # content switching based on SNI
  21.  
  22. backend bk_cert1
  23. mode http
  24. server srv1 <ip-address2>:80
  25.  
  26. backend bk_cert2
  27. mode http
  28. server srv2 <ip-address3>:80
  29.  
  30. /etc/ssl/private/mydomain.pem
  31. /etc/ssl/private/myotherdomain.pem
  32.  
  33. frontend https-in:
  34. bind *:443 ssl crt-list /etc/ssl/private/crt-list.txt
Add Comment
Please, Sign In to add comment