From 2b49c5a02e0797926bc5209248a2b4b8c4eab59d Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Mon, 9 Mar 2020 20:10:59 -0500 Subject: [PATCH] roles/dch-proxy: Configure proxy for Nextcloud This commit adds front-end and back-end configuration for HAProxy to proxy HTTP/HTTPS for *nextcloud.pyrocufflink.net*/*nextcloud.pyrocufflink.blue* to *cloud0.pyrocufflink.blue*. --- roles/dch-proxy/templates/backend-nextcloud.haproxy.cfg.j2 | 7 +++++++ roles/dch-proxy/templates/frontend-main.haproxy.cfg.j2 | 2 ++ 2 files changed, 9 insertions(+) create mode 100644 roles/dch-proxy/templates/backend-nextcloud.haproxy.cfg.j2 diff --git a/roles/dch-proxy/templates/backend-nextcloud.haproxy.cfg.j2 b/roles/dch-proxy/templates/backend-nextcloud.haproxy.cfg.j2 new file mode 100644 index 0000000..cff23d5 --- /dev/null +++ b/roles/dch-proxy/templates/backend-nextcloud.haproxy.cfg.j2 @@ -0,0 +1,7 @@ +backend nextcloud + server nextcloud cloud0.pyrocufflink.blue:80 check + + +backend nextcloud-tls + mode tcp + server nextcloud cloud0.pyrocufflink.blue:443 check diff --git a/roles/dch-proxy/templates/frontend-main.haproxy.cfg.j2 b/roles/dch-proxy/templates/frontend-main.haproxy.cfg.j2 index d7dd16b..1999272 100644 --- a/roles/dch-proxy/templates/frontend-main.haproxy.cfg.j2 +++ b/roles/dch-proxy/templates/frontend-main.haproxy.cfg.j2 @@ -7,6 +7,7 @@ frontend main use_backend jenkins if { hdr(host) -i jenkins.pyrocufflink.net } use_backend bitwarden if { hdr(host) -i bitwarden.pyrocufflink.blue } use_backend bitwarden if { hdr(host) -i bitwarden.pyrocufflink.net } + use_backend nextcloud if { hdr(host) -i nextcloud.pyrocufflink.net } default_backend web @@ -24,6 +25,7 @@ frontend main-tls use_backend jenkins-tls if { req_ssl_sni -i jenkins.pyrocufflink.net } use_backend bitwarden-tls if { req_ssl_sni -i bitwarden.pyrocufflink.blue } use_backend bitwarden-tls if { req_ssl_sni -i bitwarden.pyrocufflink.net } + use_backend nextcloud-tls if { req_ssl_sni -i nextcloud.pyrocufflink.net } use_backend web-tls if { req_ssl_sni -i darkchestofwonders.us } use_backend web-tls if { req_ssl_sni -i pyrocufflink.net } default_backend openvpn