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:
1 parent
14978b6de0
commit
0afdd670ff
1 file changed
+3
-1
@@ -104,7 +104,9 @@ gotify-assistant.thesatelliteoflove.com {
|
|||||||
pdg.thesatelliteoflove.com {
|
pdg.thesatelliteoflove.com {
|
||||||
import hsts
|
import hsts
|
||||||
root * /srv/pdg
|
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
|
file_server
|
||||||
encode gzip
|
encode gzip
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user