Skip to content

Instantly share code, notes, and snippets.

@jamesbeedy
Last active February 27, 2017 18:10
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 jamesbeedy/fa588b242ccffe5ce52c1e41c895e274 to your computer and use it in GitHub Desktop.
Save jamesbeedy/fa588b242ccffe5ce52c1e41c895e274 to your computer and use it in GitHub Desktop.
services:
haproxy:
series: xenial
charm: cs:haproxy-40
num_units: 1
options:
ssl_key: |
...mykey...
ssl_cert: |
...mycert...
services: |
- service_name: haproxy_service
service_host: "0.0.0.0"
service_port: 80
service_options: [balance leastconn, cookie SRVNAME insert, 'redirect scheme https code 301 if !{ ssl_fc }']
server_options: balance leastconn, cookie SRVNAME insert
- service_name: haproxy_service2
service_host: "0.0.0.0"
service_port: 443
crts: [DEFAULT]
service_options: [balance leastconn, acl foo dst_port 443, use_backend haproxy_service if foo]
server_options: maxconn 100 cookie S{i} check
to:
- '0'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment