1. The problem I’m having:
“unrecognized directive” error after adding log_level to host configuration in Caddyfile
2. Error messages and/or full log output:
{
"level":"info",
"ts":1796488253.341904,
"logger":"docker-proxy",
"msg":"Process Caddyfile",
"logs":"[ERROR] Removing invalid block: Caddyfile:20: unrecognized directive: log_level\nhomarr.home.example.com {\n\timport acme-rfc2136\n\tlog_level /api/health/live ERROR\n\treverse_proxy homarr:7575\n}\n\n"
}
3. Caddy version:
Docker latestsha256:34b7a3f3b68814a3911ab2c5227bbff08f851b67e7b0d8d8923b07bb08bccd0d
4. How I installed and ran Caddy:
Docker
a. System environment:
Everything else works
b. Command:
Everything else works
c. Service/unit/compose file:
Everything else works
d. My complete Caddy config:
homarr.home.example.com {
# Certificate configuration/generation
import acme-rfc2136
# Specific log levels for paths (most specific path wins)
log_level /api/health/live ERROR
# Reverse proxy configuration
reverse_proxy homarr:7575
}