Created
May 16, 2017 16:22
-
-
Save leanderjanssen/0d82444d3dd85d2b3e294147179f8545 to your computer and use it in GitHub Desktop.
Example haproxy.cfg for UCP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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