Skip to content

Server Logs

# Accessing logs

Trellis CLI includes a logs command for quickly accessing logs. It automatically integrates with GoAccess when the --goaccess option is used.

$ trellis logs [options] ENVIRONMENT [SITE]
Description Command
View production logs trellis logs production
View access logs only trellis logs --access production
View error logs only trellis logs --error production
View logs in GoAccess trellis logs --goaccess production
View the last 50 log lines trellis logs -n 50 production

Run trellis logs --help for further information.

# Location of logs

Server logs for Trellis sites can be found at /srv/www/

  • /srv/www/
  • /srv/www/

Any server 500 errors or white screen issues should be debugged by viewing the error logs in the /srv/www/ directory.

Trellis uses the ansible-logrotate role to install and configure logrotate for sites and can be configured by editing group_vars/all/logrotate.yml.


Last updated

Support Roots

Help us continue to build and maintain our open source projects. We’re a small team of independent developers and every little bit helps.

Sponsor Roots on GitHub