Locations of Common Log Files on cPanel Servers

KB Tags associated with this article:
Use all tags
KB Tags
Body

Log files on cPanel servers are not stored at the same location of the default OS installation. The locations of common log files are shared below.

Apache

Apache is the web server that is typically utilized by cPanel. On cPanel servers, Apache writes to a high number of logs as each site has its own traffic 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.

    /usr/local/apache/logs/access_log

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

    /usr/local/apache/logs/error_log

  • 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.

    /usr/local/apache/domlogs

Exim

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

  • The exim_mainlog contains all interactions that Exim handles, which include both incoming and outgoing mail transactions.

    /var/log/exim_mainlog

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

    /var/log/exim_rejectlog

cPanel

cPanel logs all HTTP traffic to WHM, webmail, and cPanel.  

  • All cPanel logs are located in the logs directory.

    /usr/local/cpanel/logs

  • The access_log contains all traffic to WHM, webmail, and cPanel access

    /usr/local/cpanel/logs/access_log

  • The error_log contains all errors that occur when accessing a cPanel related site over HTTP or HTTPS

    /usr/local/cpanel/logs/error_log

FTP

Regardless of the FTP server you use, cPanel logs all connections, uploads, and downloads into the system messages log file.

All FTP transactions are recorded in messages. This file also has a lot of other messages with the FTP transactions.

/var/log/messages

MySQL

The MySQL log will contain all actions related to start, stop, or restart along with errors if any.

/var/lib/mysql/hostname.err