Skip to content

Instantly share code, notes, and snippets.

@leanderjanssen
Created May 16, 2017 16:22
Show Gist options
  • Select an option

  • Save leanderjanssen/0d82444d3dd85d2b3e294147179f8545 to your computer and use it in GitHub Desktop.

Select an option

Save leanderjanssen/0d82444d3dd85d2b3e294147179f8545 to your computer and use it in GitHub Desktop.
Example haproxy.cfg for UCP
global
log /dev/log local0
log /dev/log local1 notice
defaults
mode tcp
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000
### frontends
# Optional HAProxy Stats Page accessible at http://<host-ip>:8181/haproxy?stats
frontend ucp_stats
mode http
bind 0.0.0.0:8181
default_backend ucp_stats
frontend ucp_443
mode tcp
bind 0.0.0.0:443
default_backend ucp_upstream_servers_443
### backends
backend ucp_stats
mode http
option httplog
stats enable
stats admin if TRUE
stats refresh 5m
backend ucp_upstream_servers_443
# This config assumes that UCP is listening on port 12390 for HTTPS connections
mode tcp
option httpchk GET /_ping
server node01 <ucp node-1 ip>:12390 weight 100 check check-ssl verify none
server node02 <ucp node-2 ip>:12390 weight 100 check check-ssl verify none
server node03 <ucp node-3 ip>:12390 weight 100 check check-ssl verify none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment