cPanel/WHM log files are essential for troubleshooting, auditing, and optimizing server performance. This guide simplifies navigating these logs, detailing their locations, uses, and practical examples to help sysadmins and hosting providers manage servers efficiently on AvaHost or similar platforms.
WHM (Web Host Manager) is the administrative interface used to manage cPanel accounts on a server. Behind the scenes, WHM continuously logs key activities, service behavior, errors, and system processes. These logs are stored in various locations on the server, typically in the /var/log directory.
Below are some of the most important log files you’ll interact with:
Access Logs: /etc/apache2/logs/access_log
Error Logs: /etc/apache2/logs/error_log
These logs capture HTTP requests and Apache-related errors, essential for monitoring traffic and identifying issues with websites.
cPanel Error Log: /usr/local/cpanel/logs/error_log
Useful for debugging issues with the cPanel interface and its functions.
Access Log: /usr/local/cpanel/logs/access_log
Records user logins and API calls — handy for auditing.
Login Log: /usr/local/cpanel/logs/login_log
Lists login attempts via cPanel, WHM, or Webmail.
Update Logs: /var/cpanel/updatelogs/
Stores logs for cPanel version updates and EasyApache runs.
Exim Main Log: /var/log/exim_mainlog
Tracks all incoming/outgoing mail.
Exim Reject Log: /var/log/exim_rejectlog
Lists rejected mail with reasons — useful for fighting spam.
Exim Panic Log: /var/log/exim_paniclog
Records serious Exim errors.
MySQL Error Log: /var/lib/mysql/hostname.err
Important for detecting database-related issues.
ProFTPD Logs: /var/log/messages or /var/log/xferlog
Depending on the FTP server used, this log tracks file uploads/downloads.
Here are some practical ways to utilize WHM log files:
Monitor resource abuse: Check access logs for spikes in traffic or suspicious IPs.
Track login activity: Identify unauthorized access attempts.
Debug email problems: Use Exim logs to trace mail delivery issues.
Audit website errors: Apache error logs often contain clues about broken scripts or permission issues.
Rotate logs regularly to avoid large files that consume disk space.
Use command-line tools like grep, tail, and awk to filter and analyze logs.
Set up log monitoring with tools like Logwatch, CSF/LFD, or third-party dashboards (e.g., ELK stack).
cPanel/WHM log files are powerful tools for diagnosing issues, securing servers, and optimizing performance. By mastering key logs like Apache, Exim, and MySQL, and using the provided examples, you can troubleshoot effectively. With AvaHost’s reliable hosting and cPanel integration, these logs become even easier to manage, ensuring your server stays secure and efficient.