Help Docs Control Panel Guides The Ultimate Guide to the WHM Control Panel (2025) Find Common Log Files on WHM / cPanel Servers

Find Common Log Files on WHM / cPanel Servers

Find log file locations on WHM/cPanel servers. Covers Apache, Exim, MySQL & more to help you troubleshoot server errors and monitor activity.

Overview

WHM / cPanel-based servers make server management easy by providing centralized logging for troubleshooting, system monitoring, and systems auditing. Every  cPanel server keeps key log files in predictable locations, making it easier to identify and resolve issues across services.

This article outlines the most common log files you may need, including Apache, Exim, MariaDB / MySQL, PHP-FPM, cron, FTP, SSH, and WHM / cPanel-specific logs.

To access these logs, you must log into your server using SSH and navigate the filesystem using the command line.

Parameters / Features

  • Apache: Apache is the web server commonly used on cPanel servers. Each site has its own logs for traffic and errors.
  • Exim: Exim is the Mail Transfer Agent (MTA) on cPanel servers.
  • MariaDB / MySQL: MariaDB is the default database engine for cPanel. Logs are crucial for database error detection and query troubleshooting.
  • Cron: Automates scheduled tasks on cPanel servers.
  • cPanel: WHM / cPanel itself logs interactions with WHM, webmail, and cPanel services.

Essential Commands for Reading Logs

You don’t need to be a command-line expert to read logs. These four simple commands will handle almost every situation:

  • less: The best and safest way to browse a large log file. It lets you scroll up and down without loading the entire file into memory. (Example: sudo less /var/log/syslog)
  • tail: Shows you the last 10 lines of a file, which is perfect for seeing the most recent events. Use tail -f to watch a log file in real-time as new entries are added. (Example: sudo tail -f /var/log/nginx/error.log)
  • grep: Your most powerful troubleshooting tool. It searches for specific keywords within a file, allowing you to instantly find lines containing “error,” “failed,” or a specific IP address. (Example: sudo grep “Failed password” /var/log/auth.log)
  • zcat / zless: As logs get old, a process called “log rotation” compresses them into .gz archives to save space. You can’t read these with cat or less. Instead, use zcat or zless to view their contents without decompressing them first. (Example: sudo zless /var/log/syslog.2.gz)

Common Use Cases / Examples

PurposeLog FileCommon Use CasesExample Command
Apache Global Access Log/usr/local/apache/logs/access_logReview HTTP requests or monitoring traffic patterns.sudo tail -f /usr/local/apache/logs/access_log
Apache Global Error Log/usr/local/apache/logs/error_logReview HTTP errors to debug apache-level issues.sudo tail -f /usr/local/apache/logs/error_log
Apache Domain-specific logs/usr/local/apache/domlogsReviewing HTTP requests per-domain to debug website errors or monitor traffic patterns.cat /usr/local/apache/domlogs/example.com
Global Cron log/var/log/cronMonitor scheduled tasks to debug errors and verify execution.grep "username" /var/log/cron
FTP and SSH log all connections. FTP tracks uploads, and downloads./var/log/messagesTroubleshooting failed file transfers or ssh connections.
Monitoring user FTP or SSH activity.
grep "ftp" /var/log/messages

grep "sshd" /var/log/secure
Authentication log/var/log/secureAudit login attempts and privilege escalations to investigate potential security threatsgrep "Failed password" /var/log/secure
Exim Main email log/var/log/exim_mainlogTroubleshoot incoming / outgoing email transactions and delivery failures.grep "example.com" /var/log/exim_mainlog
Exim rejected mail log /var/log/exim_rejectlogReview any rejected mail connection or spam attempts.tail -f /var/log/exim_rejectlog
General mail log/var/log/maillogAudit mail activity across all services and identify server-level mail errors.grep "example.com" /var/log/maillog
MariaDB / MySQL error log/var/lib/mysql/{hostname}.errCheck for errors while troubleshooting a database.grep "ERROR" /var/lib/mysql/$(hostname).err
MariaDB / MySQL slow query log (if enabled)/var/lib/mysql/{hostname}-slow.logIdentify slow or failing queries.grep -A 1 'Query_time: [1-9][0-9]' /var/lib/mysql/$(hostname)-slow.log
MariaDB / MySQL general log (if enabled)/var/lib/mysql/{hostname}-general.logAudit every single SQL statement received. Review what the database is doing in real-time.grep -i -C 5 'wp_posts' /var/lib/mysql/$(hostname)-general.log
PHP-FPM Per-Version Error log/opt/cpanel/ea-php*/root/usr/var/log/php-fpm/error.logDebugging PHP runtime errors.tail -f /opt/cpanel/ea-php82/root/usr/var/log/php-fpm/error.log
PHP-FPM Per-user log/opt/cpanel/ea-php*/root/usr/var/log/php-fpm/{user}.logMonitor PHP-FPM pool performance or troubleshoot site-specific errors.grep -i "fatal error" /opt/cpanel/ea-php82/root/usr/var/log/php-fpm/cpanel_user.log
WHM / cPanel Access log/usr/local/cpanel/logs/access_logAudit WHM / cPanel access attempts.grep "POST /login" /usr/local/cpanel/logs/access_log | awk '{print $1}' | sort | uniq -c | sort -nr
WHM / cPanel Error log/usr/local/cpanel/logs/error_logTroubleshoot WHM / cPanel control panel issues.tail -f -n 50 /usr/local/cpanel/logs/error_log
WHM / cPanel Login log/usr/local/cpanel/logs/login_logTroubleshooting failed logins.tail -f /usr/local/cpanel/logs/login_log
WHM / cPanel Session log/usr/local/cpanel/logs/session_logAudit user activities while they are logged into cPanel.grep "cpanel_user" /usr/local/cpanel/logs/session_log
WHM / cPanel cPHulk log/usr/local/cpanel/logs/cphulkd.logDetecting brute-force attacks with cPHulk.grep "failed" /usr/local/cpanel/logs/cphulkd.log
WHM / cPanel Backup log/usr/local/cpanel/logs/cpbackupTroubleshooting failed backups.grep -i "fail|error" $(ls -t /usr/local/cpanel/logs/cpbackup/* | head -n 1)
WHM / cPanel AutoSSL log/usr/local/cpanel/logs/autossl_logMonitoring backup and AutoSSL activities.grep "example.com" /usr/local/cpanel/logs/autossl_log | tail -n 20

Troubleshooting & FAQs

You may need root or sudo. Without proper access, logs may appear empty.

The tail -f command will stream in new log entries as they are populated.

tail -f /path/to/logfile

Check the domain’s virtual host configuration and verify permissions on /usr/local/apache/logs and /usr/local/apache/domlogs.

Ensure logging is enabled in Exim and look in /var/log/maillog, as some mail may log there.

Log paths and commands are case-sensitive. Type exactly as shown.

Was this article helpful?