Skip to content

Trellis Docs

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.

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/example.com/logs/:

  • /srv/www/example.com/logs/access.log
  • /srv/www/example.com/logs/error.log

Any server 500 errors or white screen issues should be debugged by viewing the error logs in the /srv/www/example.com/logs/ 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.

Contributors

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

Getting Started