diff --git a/haproxy/config/haproxy.cfg b/haproxy/config/haproxy.cfg index e4a8508..b72d42c 100644 --- a/haproxy/config/haproxy.cfg +++ b/haproxy/config/haproxy.cfg @@ -17,7 +17,7 @@ listen haproxy-monitoring frontend http bind *:80 mode http - use_backend http_mail_server if { hdr(host) -i mail.zweili.org } + redirect scheme https code 301 if { hdr(host) -i mail.zweili.org ! {ssl_fc } redirect scheme https code 301 if { hdr(host) -i git.2li.ch } !{ ssl_fc } redirect scheme https code 301 if { hdr(host) -i heimdall.2li.ch } !{ ssl_fc } redirect scheme https code 301 if { hdr(host) -i nextcloud.2li.ch } !{ ssl_fc } @@ -44,7 +44,7 @@ frontend https # Figure out which backend (= VM) to use use_backend git_server if { req_ssl_sni -i git.2li.ch } use_backend heimdall_server if { req_ssl_sni -i heimdall.2li.ch } - use_backend mail_server if { req_ssl_sni -i mail.zweili.org } + use_backend webmail_server if { req_ssl_sni -i mail.zweili.org } use_backend nextcloud_server if { req_ssl_sni -i nextcloud.2li.ch } use_backend fw-nextcloud_server if { req_ssl_sni -i plattform.2li.ch } use_backend ttrss_server if { req_ssl_sni -i ttrss.2li.ch }