From 1160ce4a8bc065a688ffb0baddb2caa15e8b126c Mon Sep 17 00:00:00 2001 From: Benno Tielen Date: Fri, 28 Aug 2026 14:34:04 +0200 Subject: [PATCH] feature: infra --- infra/ansible/inventory/production.yml | 17 +++++++++++++++++ .../ansible/roles/caddy/templates/Caddyfile.j2 | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/infra/ansible/inventory/production.yml b/infra/ansible/inventory/production.yml index ed2809e..ab253e5 100644 --- a/infra/ansible/inventory/production.yml +++ b/infra/ansible/inventory/production.yml @@ -44,6 +44,23 @@ all: caddy_redirects: - from: www.hl-mutter-teresa-chemnitz.de to: hl-mutter-teresa-chemnitz.de + # Parish shortcut subdomains (replace the HTTP-only IONOS forwards; + # to_path drops the incoming URI and redirects to a fixed page) + - from: st-antonius.hl-mutter-teresa-chemnitz.de + to: hl-mutter-teresa-chemnitz.de + to_path: /gemeinde/st-antonius + - from: st-franziskus.hl-mutter-teresa-chemnitz.de + to: hl-mutter-teresa-chemnitz.de + to_path: /gemeinde/st-franziskus + - from: st-johannes-nepomuk.hl-mutter-teresa-chemnitz.de + to: hl-mutter-teresa-chemnitz.de + to_path: /gemeinde/st-johannes-nepomuk + - from: st-joseph.hl-mutter-teresa-chemnitz.de + to: hl-mutter-teresa-chemnitz.de + to_path: /gemeinde/st-joseph + - from: st-marien.hl-mutter-teresa-chemnitz.de + to: hl-mutter-teresa-chemnitz.de + to_path: /gemeinde/st-marien-zschopau # App environments app_environments: diff --git a/infra/ansible/roles/caddy/templates/Caddyfile.j2 b/infra/ansible/roles/caddy/templates/Caddyfile.j2 index 87c7718..1989cf4 100644 --- a/infra/ansible/roles/caddy/templates/Caddyfile.j2 +++ b/infra/ansible/roles/caddy/templates/Caddyfile.j2 @@ -6,7 +6,7 @@ {% endfor %} {% for redirect in caddy_redirects | default([]) %} {{ redirect.from }} { - redir https://{{ redirect.to }}{uri} permanent + redir https://{{ redirect.to }}{{ redirect.to_path | default('{uri}') }} permanent } {% endfor %}