Loading...

Knowledge Base

cPanel Server Log File Locations

Log files on cPanel servers are not always stored in the default operating system log locations. cPanel maintains its own structured log paths for services such as Apache, Exim, FTP, and MySQL.

Below are the commonly used log file locations.

Apache Logs
Apache is the web server typically used on cPanel servers. Each website maintains its own traffic logs in addition to global Apache logs.

Access Log

/usr/local/apache/logs/access_log

The access_log is used to log all HTTP requests received. These requests can be valid or invalid. All of this gets logged in the access_log file.

Error Log

/usr/local/apache/logs/error_log

On cPanel servers, all Apache errors, regardless of site, are logged in the error_log file.

Per-Domain Logs

/usr/local/apache/domlogs

Within the domlogs folder, each site on the server will have its own log file. These files will be the fully qualified domain name for the domain, i.e., abc.com, xyz.com. All HTTP traffic to a site will be logged in this log file.

Exim Logs
Exim is the MTA (Mail Transfer Agent) that cPanel utilizes. Exim has three primary logs, but only two of these logs contain useful information.

Main Mail Log

/var/log/exim_mainlog

The exim_mainlog contains ALL interactions that Exim handles, including both incoming and outgoing mail transactions.

Reject Log

/var/log/exim_rejectlog

The exim_rejectlog contains all connection attempts that were denied. This information is also logged in the exim_mainlog.

cPanel Logs
cPanel does log all HTTP traffic to WHM, Webmail, and cPanel access. All cPanel logs are located in the /usr/local/cpanel/logs directory.

Access Log

/usr/local/cpanel/logs/access_log

This access_log contains all traffic to WHM, cPanel, and Webmail over HTTP.

Error Log

/usr/local/cpanel/logs/error_log

This error_log contains all errors that occur when accessing a cPanel-related site over HTTP or HTTPS.

FTP Logs
Regardless of the FTP service configured, cPanel records FTP activity in:

/var/log/messages

This file logs:
FTP connections
Uploads
Downloads
Note: This file also contains other system messages along with FTP entries.

MySQL Logs
MySQL logs service-related events and errors in:

/var/lib/mysql/hostname.err

This log file contains:
MySQL service start/stop/restart events
MySQL errors (if any)




Loading...