how to use GoAccess with Caddy

dec 26 2021

GoAccess is a simple and lightweight tool for viewing webserver access log files; it can subsitute a lot of the things that you'd normally need something like Google Analytics for. however, Caddy does not create logs compatible with GoAccess by default. luckily, this is an easy Caddyfile change.

/etc/caddy/Caddyfile {
  root * /var/www
  log {
    output file /var/log/caddy/access.log
    format single_field common_log

once you add the log directive to your Caddyfile, simply run GoAccess, and you'll get a nice way to view the logs in your terminal.

goaccess /var/log/caddy/access.log --log-format=COMMON