Viewing your access and error logs via SFTP | GreggHosting

The affects of Web Hosts on Your Business Website

Here're ways your choice of web hosting service provider impacts the performance of your business:


check

Website loading speed

check

Uptime and availability

check

Customer support

check

Security

check

Server location

Viewing your access and error logs via SFTP

Viewing your access and error logs via SFTP

error logs

Overview

You may need to inspect your site’s error logs and access logs for troubleshooting reasons to learn more about why an issue occurred. This article shows how to use SFTP to read these logs.

Instead, read the following articles if you want to see and analyze these files over SSH:

Using SSH to examine and view your access.log
Viewing and examining your error log via SSH
Every night, logs are rotated so that access.log and error logs only contain logs from today, whereas error logs .0 and access.log.0 have logs from the previous day.
Because log files are quickly lost after this, it’s best to review them as soon as possible.
GreggHost keeps HTTP logs for three days by default, as required by GDPR.

Viewing the logs via SFTP

The file manager in the panel does not allow you to access your logs.

Using the panel’s internet file management
To access your logs, you’ll need a fully functional FTP client like Filezilla or Cyberduck.

As previously stated, the logs are located in the /logs/example.com/http(s) directory under your server login.

To see the logs, go to:

Make sure your user has access to SFTP or Shell. Instructions can be found in the article Creating a user with Shell (SSH) access.
Use your client to connect to your server. For more information, see the FTP article.
You’ll notice various files once you’ve signed on; in this case, we’re in the exampleuser’s directory, as noted by the Remote site: field containing /home/exampleuser:
01 Error Log.fw.png Error Log.fw.png Error Log.fw.
Go to the /logs directory and double-click it.
Following that, you’ll see a list of sites linked to this user:
01 Error Log.fw.png 02 Error Log.fw.png
From the following directory, select the appropriate site.
03 Error Log.fw.png Error Log.fw.png Error Log.fw.
Depending on which logs you want to see, go to the http or https directory.
You may see a random string of digits after your http or https directory, or you may see many directories. To find the most recent directory, simply glance at the date to the right.

As of today, you may examine the error logs and access.log.
04 Error Log.fw.png Error Log.fw.png Error Log.fw.