← ServerPilot Docs

Where to Find Your Log Files

When things go wrong with your apps, looking through your log files is the first step to troubleshooting your problems.

The most common logs to examine are your app's Nginx, Apache, and PHP logs, which will likely show details about any errors:

Nginx Access Log

/srv/users/SYSUSER/log/APPNAME/APPNAME_nginx.access.log

Nginx Error Log

/srv/users/SYSUSER/log/APPNAME/APPNAME_nginx.error.log

Apache Access Log

/srv/users/SYSUSER/log/APPNAME/APPNAME_apache.access.log

Apache Error Log

/srv/users/SYSUSER/log/APPNAME/APPNAME_apache.error.log

PHP Access Log

/srv/users/SYSUSER/log/APPNAME/APPNAME_phpX.Y.access.log

PHP Error Log

/srv/users/SYSUSER/log/APPNAME/APPNAME_phpX.Y.error.log

PHP Slow Request Log

/srv/users/SYSUSER/log/APPNAME/APPNAME_phpX.Y.slow.log

Remember to replace SYSUSER with the system user that owns your app, APPNAME with the name of your app, and X.Y with your app's PHP version.

There may also be occasions when you need to view the global (system-wide) logs in order to determine the cause of non-app specific issues. For example, you would check these logs for trouble with services (eg. MySQL, mail, PHP, etc.) or the system itself. These must be accessed as the root user, and are found here:

/var/log/

Within /var/log/, you'll see both log files and directories. The following are the most common non-app specific logs customers need to access:

/var/log/mail.log
/var/log/mysql/error.log
/var/log/mysql/mysql-slow.log
/var/log/apache-sp/error.log
/var/log/nginx-sp/error.log
/var/log/phpX.Y-fpm-sp.log (replace X.Y with your PHP major and minor version)

Important (but usually very technical) system information can be found here:

/var/log/syslog

WARNING: Never delete active log files! This could potentially break services, logging, and possibly even take your apps and server down! The only log files which are safe to delete will end in .gz or .1. Please contact support if an active log file is taking up all of your disk space, and we will evaluate the safest way to help.

Last updated: February 9, 2020

Launch your first site in 5 minutes