From 0afdd670ff180c5cb6ce24631cf8a7d7c1547c43 Mon Sep 17 00:00:00 2001 From: Phil Date: Fri, 27 Nov 2026 11:22:00 -0700 Subject: [PATCH] caddy: serve pdg root page try_files {path}/ never matches "/" in Caddy 2.11, so the pdg home page returned the 404 page. Adding {path}/index.html after {path}/ fixes / while keeping the /dir -> /dir/ redirect for subfolders. Tested locally against a copy of the site: only / changes (404 -> 200). Co-Authored-By: Claude Opus 5.5 --- roles/docker/templates/Caddyfile.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/docker/templates/Caddyfile.j2 b/roles/docker/templates/Caddyfile.j2 index 532a368..4b59701 100644 --- a/roles/docker/templates/Caddyfile.j2 +++ b/roles/docker/templates/Caddyfile.j2 @@ -104,7 +104,9 @@ gotify-assistant.thesatelliteoflove.com { pdg.thesatelliteoflove.com { import hsts root * /srv/pdg - try_files {path} {path}.html {path}/ =404 + # "{path}/" keeps the /dir -> /dir/ redirect; "{path}/index.html" is + # needed for "/" itself, which "{path}/" never matches in Caddy 2.11. + try_files {path} {path}.html {path}/ {path}/index.html =404 file_server encode gzip