Important Files in Cpanel Server

This article explains the locations of important configuration files and log files in cpanel.

cPanel/WHM

  • /etc/vfilters/domainname - Email filters are set here
  • /etc/userdomains - All domains are listed here (addons, parked,subdomains along with their usernames)
  • /etc/cpbackup-userskip.conf - To exclude users from backups
  • /etc/resolv.conf - Resolvers configuration file (WHM -> Networking Setup -> Resolver Configuration)
  • /etc/nameserverips - Name Servers for DNS service (WHM -> DNS Functions -> Nameserver IPs)
  • /var/cpanel/resellers - Permissions for Resellers while using addpkg script
  • /etc/chkserv.d - All the services managed by Chkservd are stored here as files (WHM -> Service Configuration -> Service Manager)
  • /etc/ipaddrpool - Lists the free IP addresses on your server
  • /etc/domainips - Dedicated IP addresses assigned to domains
  • /etc/ips - Lists IP addresses on the server (WHM -> IP Functions -> Show IP Address Usage)
  • /etc/wwwacct.conf - Account creation defaults file in WHM (Basic cPanel/WHM Setup)
  • /etc/cpupdate.conf - Update configuration file for cPanel/WHM, Packages installed by cPanel/WHM & Operating System, SpamAssasin rules
  • /etc/cpbackup.conf - Backup configuration file
  • /var/run/chkservd - WHM -> Server Status -> Service Status
  • /var/log/dcpumon - Top log process
  • /root/cpanel3-skel - Skeleton directory
  • /var/spool/exim/msglog - Email message logs
  • /var/spool/cron - Cron jobs are stored here for all users
  • /var/cpanel/users - cPanel user file that defines account settings
  • /var/cpanel/users.cache - User cache files that are read by cPanel
  • /var/cpanel/cpanel.config - cPanel configuration file (WHM -> Server Configuration -> Tweak Settings)
  • /var/cpanel/userdata - Defines parked, addon, subdomains as well as VirtualHost
  • /var/cpanel/logs - Transfer logs
  • /var/cpanel/easy/apache - EasyApache build files/profile
  • /var/cpanel/userhomes - Session home for cPanel, Horde, Roundcube, phpmyadmin
  • /var/cpanel/serviceauth - chkservd service authentication data
  • /var/cpanel/updatelogs - upcp Daily logs
  • /var/cpanel/horde - Directory which stores Horde Version, Backups and Logs files
  • /var/cpanel/roundcube - Directory which stores RoundCube Version, Backups and Logs files
  • /var/cpanel/squirrelmail - Squirrelmail version file is stored here
  • /var/cpanel/cpanelsync - DNS Clustering files
  • /var/cpanel/bandwidth - This directory includes .rrd files of domains
  • /var/cpanel/<reseller_username>.accts - Reseller account file
  • /var/cpanel/packages - Hosting packages configuration files are stored here
  • /var/cpanel/root.accts - root owned domains are listed in this file
  • /var/cpanel/suspended - All suspended accounts are listed here
  • /var/cpanel/users - cPanel users file (user account configurations such as - theme, bwlimit, addon, parked, sub-domains, etc.)
  • /var/cpanel/zonetemplates - DNS Zone template files are stored here

Apache

  • Configuration files (httpd.conf, php.conf) - /usr/local/apache/conf
  • Apache binaries (httpd, apachectl, apxs) - /usr/local/apache/bin
  • CGI files - /usr/local/apache/cgi-bin
  • Domain access and stat log files (for all domains) - /usr/local/apache/domlogs
  • Default Apache DocumentRoot location - /usr/local/apache/htdocs
  • Header files - /usr/local/apache/include
  • Apache logs - /usr/local/apache/logs:
    access_log (all http requests)
    error_log (all Apache errors)
    suexec_log (all suEXEC transactions and errors are logged here)
  • Apache manual pages - /usr/local/apache/man
  • Icon files (png, gif files) - /usr/local/apache/icons
  • Shared object (.so) files - /usr/local/apache/modules
  • Apache modules - /opt
  • Init script - /usr/local/apache/bin/apachectl (or /etc/rc.d/init.d/httpd)
  • cPanel script to restart Apache - /scripts/restartsrv httpd or /scripts/restartsrv apache

Exim

  • Conf - /etc/exim.conf (Exim's main configuration file. It is recommended that you do not edit this manually.)
  • List of domains allowed to relay/receive mail - /etc/localdomains
  • Log - /var/log/exim_mainlog (Incoming/Outgoing mails are logged here)
  • Log - /var/log/exim_rejectlog - (Exim rejected mails are reported here)
  • Log - /var/log/exim_paniclog - (Exim errors are logged here)
  • Mail queue - /var/spool/exim/input
  • Email forwarders and Catchall address file - /etc/valiases/<domain_name>
  • Email filters file - /etc/vfilters/<domain_name>
  • POP user authentication file - /home/<username>/etc/<domain_name>/passwd
  • Catchall inbox - /home/<username>/mail/new
  • POP user inbox - /home/<username>/mail/<domain_name>/<pop_username>/new
  • POP user spambox - /home/<username>/mail/<domain_name>/<pop_username>/spam
  • Program - /usr/sbin/exim (suid - -rwsr-xr-x 1 root root)
  • Init Script - /etc/rc.d/init.d/exim
  • cPanel script to restart Exim - /scripts/restartsrv exim

ProFTPD

  • Conf - /etc/proftpd.conf
  • Program - /usr/sbin/proftpd
  • Init Script - /etc/rc.d/init.d/proftpd
  • cPanel script to restart ProFTP - /scripts/restartsrv proftpd
  • Accounts file - /etc/proftpd/<username> (all ftp accounts are stored here)
  • Log - /var/log/messages, /var/log/xferlog

Pure-FTPD

  • Conf - /etc/pure-ftpd.conf
  • Program - /usr/sbin/pure-ftpd
  • Init script - /etc/rc.d/init.d/pure-ftpd
  • cPanel script to restart Pure-FTP - /scripts/restartsrv pureftpd
  • Accounts file - /etc/proftpd/<username> (all ftp accounts are stored here)
  • Log - /var/log/messages
  • Anonymous ftp document root - /etc/pure-ftpd/<ip_address>

MySQL

  • Conf - /etc/my.cnf (includes global values for the server), /root/.my.cnf (addendum to the main my.cnf file)
  • Program - /usr/sbin/mysqld (Daemon), /usr/bin/mysqld_safe (Startup script)
  • Init script : /etc/rc.d/init.d/mysql
  • cPanel script to restart MySQL - /scripts/restartsrv mysql
  • Log - /var/lib/mysql/<hostname>.err (Startup errors)
  • Data directory - /var/lib/mysql (All databases are stored here)
  • Database naming convention - <username>_<dbname> (Example: testcp_dbmysql)
  • Socket file - /var/lib/mysql/mysql.sock, /tmp/mysql.sock

PostgreSQL

  • Conf - /var/lib/pgsql/data/postgresql.conf and /var/lib/pgsql/data/pg_hba.conf (Client authentication)
  • cPanel script to restart PostgreSQL - /scripts/restartsrv postgresql
  • Log - /var/lib/pgsql
  • Data Directory - /var/lib/pgsql/data (all databases are stored here)

SSHD

  • Conf - /etc/ssh/sshd_config
  • Program - /usr/local/sbin/sshd
  • Init script - /etc/rc.d/init.d/sshd
  • cPanel script to restart SSHD - /scripts/restartsrv sshd
  • Log - /var/log/secure, /var/log/messages or /var/log/auth

Perl

  • Program - /usr/local/bin/perl (Symlink: /usr/bin/perl)
  • Directory - /usr/lib/perl5 (installed via yum or up2date) or /usr/local/lib/perl5 (installed by the Perl installer)
  • Version - /usr/bin/perl -v or /usr/local/bin/perl -v
  • Module Installer - /scripts/perlinstaller <module_name>
  • Build - /home/.cpan and /home/.cpcpan (Perl module sources and information for connection mirrors)

PHP

  • System PHP
  • Program - /usr/local/bin/php, /usr/bin/php
  • ini file - /usr/local/lib/php.ini
  • Recompile PHP using EasyApache - /scripts/easyapache (/usr/local/cpanel/scripts/easyapache)
  • Program - /usr/local/cpanel/3rdparty/bin/php, /var/cpanel/3rdparty/bin/php
  • ini file - /usr/local/cpanel/3rdparty/etc/php.ini

Named (BIND)

  • Conf - /etc/named.conf
  • Program - /usr/sbin/named
  • Init script - /etc/rc.d/init.d/named
  • cPanel script to restart named - /scripts/restartsrv named
  • Log - /var/log/messages, /var/named/data/named.run (Debug information is written to this file)
  • Zone files - /var/named/

NSD (Alternate DNS option)

  • Conf - /etc/nsd/nsd.conf
  • Program - /usr/sbin/nsd
  • Init script - /etc/rc.d/init.d/nsd
  • Log - /var/log/messages
  • Zone files - /var/named

Dovecot

  • Conf - /etc/dovecot.conf
  • Program - /usr/sbin/dovecot
  • Init script: /etc/rc.d/init.d/dovecot
  • cPanel script to restart dovecot - /scripts/restartsrv dovecot
  • Log - /var/log/maillog

Courier

  • Conf - /usr/local/libexec/courier-imap
  • Program - /usr/lib/courier-imap/libexec/couriertcpd
  • Init script - /etc/rc.d/init.d/courier
  • cPanel script to restart Courier- /scripts/restartsrv courier
  • Log - /var/log/maillog

Tomcat

  • Tomcat 5.5 Conf - /usr/local/jakarta/tomcat/conf/server.xml
  • Tomcat 7 Conf - /usr/local/easy/share/easy-tomcat/conf/
  • Tomcat 5.5 Binary Distribution - /usr/local/jakarta/apache-tomcat-${VERSION} (/usr/local/jakarta/tomcat is a symlink to this directory)
  • Tomcat 7 Binary Distribution - /usr/local/easy/share/easy-tomcat7
  • Java Development Kit - /usr/local/jdk/ (Also known as $JAVA_HOME. This directory contains the Java Runtime Environment (JRE).)
  • Enabling Tomcat servlets for a site - /scripts/addservlets --domain=example.com
  • Removing Tomcat servlets from a site - /scripts/remservlets --domain=example.com
  • Apache module configuration for jk connector - /usr/local/apache/conf/jk.conf
  • Start - /usr/sbin/stoptomcat
  • Stop - /usr/sbin/starttomcat
  • Restart - /usr/sbin/restartsrv_tomcat
  • cPanel script to restart Tomcat - /scripts/restartsrv tomcat
  • Log Tomcat 5.5 - /usr/local/jakarta/tomcat/logs/catalina.out (Activity log) & catalina.err (Error log),
  • /usr/local/apache/logs/mod_jk.log (for jk connector)
  • Log Tomcat 7 - /var/log/easy-tomcat7

Leave a Reply

Your email address will not be published. Required fields are marked *