Validate the Caddyfile as the caddy user
Browse filesValidating as root opens the access log, creating it owned by root, so the following reload fails with permission denied, as it did on the first deployment. The README now validates as caddy and explains the failure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Author
- Um9i vulgarmessiah@gmail.com
- Date
- 22 Nov 2026, 16:36
- Commit
- 44b30d1cef91
- Parent
- 9a916b2
1 file changed +1−1
+1−1
| @@ -117,7 +117,7 @@ Fedora's distribution-provided systemd defaults. OpenSSH uses | ||
| `deploy/gitv-purge.service` and `deploy/gitv-purge.timer` in `/etc/systemd/system`, enabled with | ||
| `systemctl enable --now gitv-purge.timer`. | ||
| **Logs.** Caddy sends HSTS (a year, so browsers never fall back to plain HTTP) and writes one JSON line per request to `/var/log/caddy/gitv-access.log`. The log rotates at 50 MiB and keeps 30 days; Caddy leaves cookie and authorization values out of it. Create the folder for Caddy once with `install -d -o caddy -g caddy -m 0750 /var/log/caddy`, then run `caddy validate --config /etc/caddy/Caddyfile` before reloading. | ||
| **Logs.** Caddy sends HSTS (a year, so browsers never fall back to plain HTTP) and writes one JSON line per request to `/var/log/caddy/gitv-access.log`. The log rotates at 50 MiB and keeps 30 days; Caddy leaves cookie and authorization values out of it. Create the folder for Caddy once with `install -d -o caddy -g caddy -m 0750 /var/log/caddy`. Before reloading, validate as the `caddy` user: `sudo -u caddy caddy validate --config /etc/caddy/Caddyfile`. Validating as root opens the log file too, leaving it owned by root, and the reload then fails with `permission denied` until that file is removed or handed to `caddy`. | ||
| gitv-web logs every judged sign-in and password change to the journal, with the client's address (or IPv6 /64) and whether the password or the code was wrong: | ||