I’m setting up Caddy with systemd. In the caddy.service file it starts Caddy with:
ExecStart=/usr/local/bin/caddy -log stdout -agree=true -conf=/etc/caddy/Caddyfile -root=/var/tmp
I would prefer to have Caddy log to a ‘standard’ location, like
/var/log/caddy. So, I tried to set that in the Caddyfile to override the caddy.service file, with
log /var/log/caddy. However, that didn’t seem to work.
The only way I can get it to work (so far) is by modifying the caddy.service file to use
-log /var/log/caddy/access.log. However, I’d prefer to not have to modify the default caddy.service file as distributed with downloads.
Maybe I’m missing something here? Any suggestions and tips greatly appreciated.