No description
Find a file
randogoth affbb703be Reload Caddy when the vhost fragment changes, and 404 unmatched paths
Caddy glob-imports Caddyfile.d/ once, at startup, and its own unit does not
change when a fragment does — so NixOS left it running and the vhost simply
did not exist. No listener, no certificate, and nothing in the log to say why,
because Caddy had never been told to look. The first deploy of this module hit
exactly that: it had to be reloaded by hand before ACME would even try.

reloadTriggers makes the fragment's content part of what decides whether Caddy
is reloaded, so this cannot recur the next time the domain or the port moves.

Also answer unmatched paths with 404. Caddy's default for a request that
matched no route is an empty 200, which made every stray path — /config.yml
among them — look like an empty file that exists. Nothing was ever served
either way, but 404 is the honest answer.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-14 12:42:25 +03:00
bin Genericise the webhook script's usage comment 2026-10-14 12:20:49 +03:00
.gitignore Reduce the README to the repo address 2026-10-14 12:27:04 +03:00
apps.nix Feed the F-Droid repo from Forgejo releases automatically 2026-10-14 11:54:26 +03:00
fdroid-sync.py Feed the F-Droid repo from Forgejo releases automatically 2026-10-14 11:54:26 +03:00
flake.lock Feed the F-Droid repo from Forgejo releases automatically 2026-10-14 11:54:26 +03:00
flake.nix Feed the F-Droid repo from Forgejo releases automatically 2026-10-14 11:54:26 +03:00
module.nix Reload Caddy when the vhost fragment changes, and 404 unmatched paths 2026-10-14 12:42:25 +03:00
README.md Reduce the README to the repo address 2026-10-14 12:27:04 +03:00