When managing a cPanel/WHM server, knowing where key configuration and log files are located is crucial for troubleshooting, optimizing performance, and ensuring security. This guide covers the most important files you need to know for managing Apache, Exim, MySQL, DNS, FTP, and other essential services on your cPanel/WHM server.

🔹 Apache (Web Server) Configuration Files

  • /etc/httpd/conf/httpd.conf – Main Apache configuration file
  • /usr/local/apache/logs/error_log – Apache error logs (check this if your site is down or behaving unexpectedly)
  • /usr/local/apache/logs/access_log – Records all web server requests
  • /usr/local/apache/domlogs/domain.com – Logs for a specific domain

🔹 Mail Server (Exim) Configuration and Logs

  • /etc/exim.conf – Exim mail server configuration
  • /var/log/exim_mainlog – Primary mail log (useful for diagnosing email delivery issues)
  • /var/log/exim_rejectlog – Logs rejected emails (e.g., spam, invalid recipients)
  • /var/log/maillog & /var/log/messages – Logs for IMAP, POP, and SpamAssassin

🔹 DNS & Name Server Configuration

  • /etc/named.conf – Main configuration file for BIND DNS
  • /etc/nameserverips – List of name server IPs assigned to the server
  • /var/named/domain.db – DNS zone files for domains

🔹 FTP Server Configuration

  • /etc/proftpd.conf – ProFTPD configuration file
  • /etc/pure-ftpd.conf – Pure-FTPd configuration file
  • /var/log/messages – Logs for FTP authentication and connection attempts

🔹 cPanel/WHM User & Account Management Files

  • /var/cpanel/users/username – Stores cPanel user account details
  • /etc/userdomains – Maps domains to cPanel users
  • /etc/localdomains – Domains allowed to send mail via the server
  • /var/cpanel/bandwidth – Bandwidth usage for domains
  • /var/cpanel/accounting.log – Logs account creation and deletion

🔹 MySQL Database Configuration

  • /etc/my.cnf – MySQL configuration file (modify for performance tuning)
  • /var/lib/mysql/ – Directory containing all database files
  • /var/log/mysqld.log – MySQL error logs

🔹 Security & Backup Configuration Files

  • /etc/cpbackup.conf – Backup configuration file
  • /etc/cpbackup-userskip.conf – Users excluded from backup
  • /usr/local/cpanel/logs/access_log – Logs all access to cPanel & WHM
  • /usr/local/cpanel/logs/error_log – Logs cPanel errors and system issues

🔹 Tomcat & Java Application Logs (If Enabled)

  • /usr/local/jakarta/tomcat/logs/catalina.out – Main log file for Tomcat-based applications
  • /usr/local/jakarta/tomcat/logs/catalina.err – Tomcat error logs

Conclusion

Keeping track of these essential cPanel/WHM configuration and log files is vital for smooth server administration. Whether you are troubleshooting issues, optimizing server performance, or enhancing security, knowing where to look can save you valuable time.

By admin