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 <noreply@anthropic.com>
This commit is contained in:
PhilandClaude Opus 5.5 committed 2026-11-27 11:22:00 -07:00
1 parent 14978b6de0
commit 0afdd670ff
1 file changed
+3 -1
+3 -1
View File
@@ -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