Analyzing Caddy's log files real time with GoAccess?

GoAccess logs browser access if you change the Caddy logging format to {combined}.

e.g.

example.com {
  log / /path/to/caddy.log "{combined}"
  ...
}

And in your GoAccess configuration, specify log-format COMBINED.

2 Likes

Off topic: it is possible to set logging options globally? I would like to configure log rotation globally, not per site.

You could try a snippet to keep the actual configuration in one place, but you’d still need to import that snippet once in each site. There’s no global site logging options.

https://caddyserver.com/v1/docs/caddyfile#snippets

2 Likes

@madrian @whitestrake is correct for v1, however in v2 you can set logging globally: JSON Config Structure - Caddy Documentation

2 Likes

Thanks to both of you. I will try the snippet method for now, but slowly it’s time to upgrade to v2 beta.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.