For troubleshooting purposes, you may sometimes need to check your site’s error logs and access logs to get more information as to why a problem may occur. This article explains how to view these logs through SFTP and Shell.
- In order to view the logs, you must log in to your server and navigate to the
- Logs are rotated every night so that access.log and error.log only contain today’s logs, while error.log.0 and access.log.0 contain logs from the day before.
- Log files are deleted shortly after this, so it’s recommended to check them as soon as possible.
Viewing the logs via SFTP
As mentioned previously, the logs are inside the /logs/example.com/http directory under your username on the server.
To view the logs:
- Make sure your user is an SFTP or Shell user. Visit the Enabling Shell Access article for instructions.
- Log into your server using your client. Visit the FTP article for details.
- Once logged in, you’ll see several files; in this example we’re in the exampleuser’s directory noted by the ‘Remote site:’ field which shows /home/exampleuser:
- Click into the /logs directory.
- You then see a list of sites associated with this user:
- Click into the appropriate site from this next directory.
- Click into the http directory.
- You’ll see the error.log and access.log as of today.
Once in the /http directory, you'll notice that your remote site looks different at the top, which shows that your selected directories have changed – this is fine.
- Right click on the log file and open with your text editing program.