Common log files’ path in cpanel servers
Cpanel server keeps frequently visited files and web traffic in log files, in these servers, locations of common log files is almost fixed for almost all versions of cPanel, hence it gets easy to track it for any service running on cpanel based server. Checkout some logs for varied services running on cPanel based servers.
Common cPanel logs
Introduction: Contains logs related to cPanel, all web traffic is logged to cPanel and webmail. Installation log contains records and errors during cPanel installation. Access log contains traffic details to cPanel and webmail. Error Log comprises of all errors that occurred while accessing cPanel. Bandwidth log contains Bandwidth history with user details.
- Directory: /usr/local/cpanel/logs
- Installation logs: /var/log/cpanel-install.log
- Access Log: /usr/local/cpanel/logs/access_log
- Error Log: /usr/local/cpanel/logs/error_log
- Bandwidth log: /var/cpanel/bandwidth/(account user name)
Apache
Introduction: It is a web server managed by cPanel typically for Linux servers, it carries log for all sites accessed with cpanel. Access log contains all the details of the requests to the servers with IPs, usernames, etc. as required. All Apache errors are logged in Error log. Domain access and error logs for each registered domain with cPanel are logged in domlog.
- Directory: /usr/local/apache/logs
- Apache access log: /usr/local/apache/logs/access_log
- General error log: /usr/local/apache/logs/error_log
- Domain access and error log (domlog): /usr/local/apache/domlogs/domain.com
FTP
Introduction: FTP does not have its own log file; it is connected with Message log of system and hence all details of FTP processes like login/access or failure, transactions or communications are logged in messages of the system.
- Directory: /var/log/messages
- FTP general login and failure log: /var/log/messages
- Transaction log: /var/log/messages /var/log/xferlog
MySQL
Introduction: It contains general information and errors related with MySQL access with the cPanel. The address may vary but many of the times remain same.
- Directory: /var/lib/mysql
- MySQL general information and error logs: /val/log/mysqld.log /var/lib/mysql/$(HOSTNAME).err
Exim
Introduction: It is a Mail Transfer Agent used by cPanel. Exim has importantly 2 useful logs they are Main log and Reject log. Main log contains all transaction details of mails with incoming and outgoing specifics. Reject log contains all failed transaction details. And IMAP logs have all general details of transaction, failures, etc.
- Main log: /var/log/exim_mainlog
- Reject log: /var/log/exim_rejectlog
- IMAP/POP logs: /var/log/maillog
These are some of the important log details; however there are many other log details also. With use of these paths, we can easily access common log files in cPanel for any services running on cPanel based servers. Share other log files you know.