How to Find cPanel and System Log File's Location on CentOS 7

Introduction

Have you ever experienced problems with your VPS server and tried to investigate the cause? It is a daunting task especially if you do not know the location of the specific log file. There is always a complete collection of log files presented for each review and identifying the exact location of these files can simplify your task by a great deal.

This guide is written to help you identify the location of cPanel and system log files with ease. The directories and file paths included in the article show unaltered configurations on RHEL, CeNTos, CloudLinux, and Amazon Linux

General

Path Description
/var/log/secure This is the file containing SSH daemon (SSHd) login attempts
/var/log/messages This file contains general error messages and login attempts for:

  • FTP
  • Nameserver daemons
  • SSH daemons
  • Courier mail server
  • Dovecot mail server

cPanel and Web Host Manager (WHM) services

The following table provides a list of all Web Host Manager and cPanel log files

 

Path Description
/home/username/.cpanel/logs This files contains a history of errors that occured within a user task queue.
/usr/local/cpanel/logs/access_log This file contains history of cpanel and WHM user account access. The history is displayed in the Common Log Format which is a standardized text format.
/usr/local/cpanel/build/locale_database_log This file contains a history of when a cpanel/WHM user amends a locale.
/usr/local/cpanel/logs/api_tokens_log This is the file archiving records of Web Host Manager API tokens logs
/usr/local/cpanel/logs/cpdavd_error_log This file contains all errors logs for WebDisk
/usr/local/cpanel/logs/cpdavd_session_log This files stores all activity logs for WebDisk
/usr/local/cpanel/logs/cpgreylistd.log This file records cpgreylistd or Greylisting daemon activity logs
/usr/local/cpanel/logs/cphulkd_errors.log This is the file containing cphulkd or Brute Force Protection Error logs
/usr/local/cpanel/logs/cphulkd.log This file contains activity logs for cphulkd daemon
/usr/local/cpanel/logs/cpwrapd_log This file contains activity logs for cPanel/WHM daemon or cpsrvd
/usr/local/cpanel/logs/dnsadmin.log This file contains request logs for dnsadmin
/usr/local/cpanel/logs/error_log This file contains error logs for cPanel account
/usr/local/cpanel/logs/incoming_http_requests.log This file contains records of the connection request logs to cPanel account server
/usr/local/cpanel/logs/license_log This file contains license errors and logs of the cPanel license update
/usr/local/cpanel/logs/login_log This file contains  records of cpsrvd daemon’s Login attempts
/usr/local/cpanel/logs/queueprocd.log This file contains all logs for queueprocd or cPanel TaskQueue Processing daemon
/usr/local/cpanel/logs/safeapacherestart_log This file contains records of every time Apache service was restarted on your server
/usr/local/cpanel/logs/session_log This file records user activities within the cPanel account
/usr/local/cpanel/logs/setupdbmap_log This file contains records of all database related activities within the cPanel.
/usr/local/cpanel/logs/stats_log This files records bandwidth statistics for all cPanel accounts within the server
/usr/local/cpanel/logs/tailwatchd_log This file contains logs for tailwatchd or the Tailwatch Driver
/usr/local/cpanel/logs/panic_log This file contains error logs for cPanel account server
/usr/local/cpanel/logs/php-fpm/error.log This file contains implementation errors for PHP-FPM. The errors include  cpdavd and cpdrvd service errors.
/var/cpanel/php-fpm/USER/logs/slow.log This the file containing the scripts that operate at unusually slow speed for a user.
/var/cpanel/php-fpm/USER/logs/error.log This file contains errors logs for cPanel user
/var/cpanel.bandwidth.cache This files records cached bandwidth history for every cPanel account on the server
/var/cpanel/accounting.log This file records all cPanel account action
/var/log/chkservd.log This file records all service status logs
/var/log/cpanel-install.log This file contains all installation logs for cPanel/WHM

Directories

The table below includes Log directories for cPanel/WHM

 

Directory path Description
/usr/local/cpanel/logs/cpbackup This directory holds cPanel backup files
/usr/local/cpanel/logs/cpbackup_transporter This is a directory containing files for the Cpanel backup transporter.
/usr/local/cpanel/logs/easy/apache This directory contains log files for EsyApache build
/usr/local/cpanel/logs/update_analysis This is a directory containing .tar files for update process
/var/cpanel/bandwidth/username This is the directory containing the bandwidth usage logs for your account
/var/cpanel/logs This directory holds log files and miscellaneous log files for your account
/var/cpanel/updatelogs This directory contains update log files for your system
/var/cpanel/logs/mysql_upgrade.log This is the directory containing MySQL upgrade logs for your account.
/var/cpanel/horde/log This is the directory containing Horde’s log files
/var/cpanel/squirrelmail This directory contains SquirreMail log files
/var/cpanel/roundcube/log This is the directory containing Roundcube Webmail log files
/var/cpanel/transfer_session This is the location for restore and transfer sessions subdirectories.

Each subdirectory holds log files for sessions in a line delimited JSON format.

FTP

Directory Path Description
/usr/local/apache/domlogs This directory holds FTP transaction logs for all cPanel accounts domains on web servers running EasyApache 3.
/etc/apache2/logs/domlogs This directory holds FTP transaction logs for all cpanel accounts domain on web servers running EasyApache 4

MAIL

FILES

Filepath Description
/var/log/exim_mainlog This file holds  delivery logs and Exim’s mail receipt for cPanel account domain
/var/log/exim_rejectlog This file holds message logs rejected by the system due to ACLs.
/var/log/exim_paniclog This file holds severe error logs for Exim.
/var/log/maillog This file contains POP3 and IMAP transactions, login attempts, and all Apache SpamAssassin scores

DIRECTORIES

Directory Path Description
/var/spool/exim/input This is a directory for queued incoming email logs
/usr/local/cpanel/3rdparty/mailman/logs This directory holds mailman logs for you account.

MEMORY USAGE

Filepath Description
/var/log/dcpumon/YYYY/MMM/DD This file holds details about processes consuming the most memory and CPU:

  • YYY is a subdirectory holding processes’ log by month.
  • MMM is a subdirectory containing YYY directory.
  • DD is a subdirectory that holds logs for process for a specific day of a month.
/var/log/munin This files holds the Munin for your accounts. A munin is a plugin that displays details of Apache, CPU, usage, Exim and other details with rrdtool utility

MYSQL

Filepath Description
/var/log/munin This is the files containing MySQL databases and errors of your cPanel account.

WEB SERVERS

Filepath Description
/usr/local/apache/domlogs/DOMAIN This is the directory containing user account’s log data existing on web servers that operates EasyApache3
/etc/apache2/logs/domlogs/DOMAIN This is the directory containing user account’s log data existing on web servers that operates EasyApache4
/var/log/apache2/modsec_audit.log This is the file containing ModSecurity’s log information
/var/log/apache2/suexec_log This is the file that holds details regarding suEXEC audit logs
/var/log/apache2/suphp_log This file holds information about audit logs for suPHP Apache module
/var/log/apache2/mod_jk.log This file holds connection logs for Apache Tomcat.
/var/log/apache2/error_log This is the file containing CGI applications and webservers’ error logs

TOMCAT

Filepath Description
/var/log/easy-tomcat7/localhost-access_log This is the file holding Tomcat access logs.
/var/log/easy-tomcat7/catalina.err This is the file holding error logs for Tomcat7
/var/log/easy-tomcat7/catalina.out This is th file containing output logs for Tomcat7

 

Conclusion

That is it! If you ever run into trouble with your VPS server, you can use the directories above to investigate the issue. Login to your server via SSH and use this article as a guide to navigating to the specific location which the exact log file is stored. If this does not help you to solve the issue, contact your VPS service provider's support. If you are not satisfied with the level of support you are currently getting from your hosting, consider switching to one that has received high grades for support in our VPS hosting reviews

 

Check out these top 3 VPS services:

Was this article helpful?