Debugging Caddy
Check live config
curl --unix-socket /run/caddy/admin.socket http://caddy/config/
Inspect a specific route by @id:
curl --unix-socket /run/caddy/admin.socket http://caddy/id/static-myservice
List all routes:
curl --unix-socket /run/caddy/admin.socket http://caddy/config/apps/http/servers/srv0/routes
Enable debug logging
Add to /etc/caddy/Caddyfile:
{
debug
}
Common errors
409 Conflict— route@idalready exists, Harbor tried toPOSTinstead ofPATCH404on/id/...— route not registered, check Harbor logs for registration errors- File server 403 — Caddy can't read the directory, check permissions and
PrivateTmpin systemd - File server 404 — check
PrivateTmp=truein Caddy's systemd unit, avoid serving from/tmp - SSE not streaming — check
X-Accel-Buffering: noheader is reaching the client - Socket permission denied — check Caddy's socket permissions, Harbor's user must be in the
caddygroup