How to check cPanel logs

How to check cPanel logs post thumbnail image

cPanel logs refer to the various log files generated by the cPanel control panel and associated services on a web hosting server. These logs are instrumental in monitoring server activity, diagnosing issues, and troubleshooting problems related to website hosting, server administration, email services, FTP, databases, and more

In a cPanel environment, various logs are generated to monitor different aspects of the server and hosting accounts. Here’s an overview of the main logs associated with different services within cPanel:

 

Apache Logs:

  1. Access Logs: Record details of every request made to the server, including IP addresses, requested files, HTTP status codes, etc. Locations:
    >> Main access log: /etc/apache2/logs/access_log
    >> Individual domain access logs: /usr/local/apache/domlogs/[domain_name]
  2. Error Logs: Capture errors encountered during Apache operations, aiding in debugging website issues. Locations:
    >> Main error log: /etc/apache2/logs/error_log
    >> Individual domain error logs: /usr/local/apache/domlogs/[domain_name]error_log

Email Logs:

  1. Exim Mail Server Logs: Track mail transactions and delivery attempts.
    >> Main log: /var/log/exim_mainlog
    >> SMTP outgoing connections: /var/log/exim_rejectlog
  2. Mail Delivery Logs: Document mail deliveries and failures.
    >>/var/log/maillog or /var/log/mail.log

FTP Logs:

  1. Pure-FTPd Logs: Record FTP transactions and user activities.
    >> Transaction logs: /var/log/messages or /var/log/syslog
    >> Account-specific logs: /var/log/pureftpd.log

MySQL Logs:

  1. MySQL Error Log: Contains errors and warnings encountered by the MySQL server.
    >> Error log location: /var/lib/mysql/[hostname].err
  2. MySQL Slow Query Log: Logs queries that take longer than a specified time to execute.
    >> Location: Usually specified in MySQL configuration (my.cnf). Commonly /var/lib/mysql/[hostname]-slow.log

WHM (Web Host Manager) Logs:

  1. cPanel Error Logs: Record errors and warnings related to WHM/cPanel operations.
    >> Location: /usr/local/cpanel/logs/error_log
  2. cPanel Access Logs: Document access to WHM/cPanel.
    >> Location: /usr/local/cpanel/logs/access_log
  3. WHM Services Status Logs: Display service status changes and server reboots. >> Location: /var/log/chkservd.log

Remember, log locations might vary based on the server configuration and software versions. Access to these logs within cPanel can also differ based on the hosting provider’s customization or specific cPanel themes. Generally, you can access most of these logs via the cPanel interface by navigating to the “Metrics” or “Logs” section.

If you’re unable to find logs via cPanel, you might need to access them directly using SSH (Secure Shell) or a file manager provided by your hosting provider.

CPanel Logs – Apache, Access, Email, Error, FTP, MySQL, WHM

cpanel log

cPanel uses a graphical interface to make web hosting super easy, but there are command line tools you could familiarize yourself with for advanced troubleshooting. cPanel logs most activity that happens on a server to log files so you can go back and review log entries for problems, instead of having to be on the server at the time of them happening.

In this guide we will see the locations of the cPanel log files for things such as access logs, Apache web server logs, email logs, error logs, ftp logs, MySQL logs, and WHM logs.

cPanel Logs - Apache, Access, Email, Error, FTP, MySQL, WHM

From the above image, you can see the log locations. However we will see the complete log lists and its location following by this image.

cPanel logs

Access logs and user actions /usr/local/cpanel/logs/access_log
Account transfers and misc. logs /var/cpanel/logs
Auditing log (account creations, deletions, etc) /var/cpanel/accounting.log
Backup logs /usr/local/cpanel/logs/cpbackup
Brute force protection (cphulkd) log /usr/local/cpanel/logs/cphulkd.log
Cpanel dnsadmin dns clustering daemon /usr/local/cpanel/logs/dnsadmin_log
Cpanel taskqueue processing daemon /usr/local/cpanel/logs/queueprocd.log
DBmapping /usr/local/cpanel/logs/setupdbmap_log
EasyApache build logs /usr/local/cpanel/logs/easy/apache/
Error log /usr/local/cpanel/logs/error_log
Installation log /var/log/cpanel
License updates and errors /usr/local/cpanel/logs/license_log
Locale database modifications /usr/local/cpanel/logs/build_locale_database_log
Login errors (CPSRVD) /usr/local/cpanel/logs/login_log
Horde /var/cpanel/horde/log/
RoundCube /var/cpanel/roundcube/log/
SquirrelMail /var/cpanel/squirrelmail/
Panic log /usr/local/cpanel/logs/panic_log
Per account bandwidth history (Cached) /var/cpanel/bandwidth.cache/{USERNAME}
Per account bandwidth history (Human Readable) /var/cpanel/bandwidth/{USERNAME}
Service status logs /var/log/chkservd.log
Tailwatch driver tailwatchd log /usr/local/cpanel/logs/tailwatch_log
Update analysis reporting /usr/local/cpanel/logs/updated_analysis/{TIMESTAMP}.log
Update (UPCP) log /var/cpanel/updatelogs/updated.{TIMESTAMP}.log
WebDisk (CPDAVD) /usr/local/cpanel/logs/cpdavd_error_log
Website statistics log /usr/local/cpanel/logs/stats_log

cPanel access log

Access logs and user actions /usr/local/cpanel/logs/access_log

 

cPanel apache log

Apache restarts done through cPanel and WHM /usr/local/cpanel/logs/safeapcherestart_log
Domain access logs /usr/local/apache/domlogs/{DOMAIN}
Processing of log splitting /usr/local/cpanel/logs/splitlogs_log
suPHP audit log /usr/local/apache/logs/suphp_log
Web server and CGI application error log /usr/local/apache/logs/error_log

 

cPanel email log

Delivery and receipt log /var/log/exim_mainlog
Incoming mail queue /var/spool/exim/input/
Log of messages rejected basedon ACLS or other policies /var/log/exim_rejectlog
Unexpected/Fatal error log /var/log/exim_paniclog
IMAP, POP login attempts, transactions,fatal errors and spam scoring /var/log/maillog
/var/log/messages

 

MySQL log

MySQL error log /var/lib/mysql/{SERVER_NAME}.err
MySQL slow query log (if enabled in my.cnf) /var/log/slowqueries

MySQL can generate various types of logs that can be helpful for troubleshooting, performance monitoring, and auditing.

The logs can provide information on queries, errors, connections, and more. The types of logs and their configurations can be managed in the MySQL configuration file (my.cnf or my.ini).

From this you find where to begin looking if you suspect problems on your cPanel server.

We hope you’ve found this useful!!

Related Post