cPanel/WHM keeps the location of key files in the same place across all of the various cPanel versions. Due to this consistency, we could always know where to look for logs files for all services running on a cPanel server.
You may find below the location of important configuration files and directories on the Linux cPanel/WHM server.
Web server ( Apache ) :
Apache HTTP server configuration file :
/usr/local/apache/conf/httpd.conf
Apache directory Structure :
/usr/local/apache/
• bin- apache binaries are stored here – httpd, apachectl, apxs
• conf – configuration files – httpd.conf – php.conf
• domlogs – domain access and stat log files are stored here for all domains
• htdocs – default apache DocumentRoot location
• include – header files
• libexec – shared object (.so) files eg. mod_rewrite.so
• logs – apache logs – access_log, error_log, suexec_log
• man – apache manual pages
• icons – icon/jpg/gif images
• modules – other shared object (.so)
• Init Script :/etc/rc.d/init.d/httpd or /usr/local/apache/bin/apachectl – apache start script
• Cpanel script to restart apache – /scripts/restartsrv_httpd
• /opt – Apache modules built here.
DNS and Networking :
• Program: /usr/sbin/named
• Init Script: /etc/rc.d/init.d/named
• Config: /etc/named.conf
• Zone files:/var/named/
/etc/named.conf – ( name server (named) configuration file).
/etc/resolv.conf – (WHM -> Networking Setup–> Resolver Configuration).
/etc/ips – ip addresses on the server (WHM >> IP Functions–>Show IP Address Usage. Except the shared ip. ).
/etc/sysconfig/network – Networking Setup.
/etc/hosts – Contains hostname and other host entries.
/etc/nameserverips – (WHM -> Networking Setup–> Nameserver IPs, Resellers nameservers )
/etc/ipaddrpool – ip addresses which are free.
/etc/ips.dnsmaster – nameserver ips.
/etc/domainips – IP’s set as dedicated for specific domains
/var/cpanel/cpanelsync – DNS Clustering files.
Mail Server and Webmail :
/etc/exim.conf – mail server configuration file
/etc/localdomains – exim related file. All the domains using the same server’s MX, should be listed here to be able to send/receive emails.
/etc/valiases/domainname – catchall and forwarders are set here.
/etc/vfilters/domainname – email filters are set here.
/var/spool/exim/input – Mail queue.
/var/spool/exim/msglog – email message logs.
/var/cpanel/horde – version file, backups and logs stored here
/var/cpanel/roundcube – version file, backups and logs stored here
/var/cpanel/squirrelmail – version file stored here.
Courier :
• Program: /usr/lib/courier-imap/libexec/couriertcpd
• Init Script: /etc/init.d/courier : /scripts/restartsrv_courier
• Config: /usr/local/libexec/courier-imap
Dovecot :
• Program: /usr/sbin/dovecot
• Init Script: /etc/init.
• Config: /etc/dovecot.conf
FTP Server :
/etc/proftpd.conf – proftpd server configuration file.
/etc/pure-ftpd.conf – pure-ftpd server configuration file.
PHP :
/usr/local/lib/php.ini – PHP configuration file.
MySQL :
/etc/my.cnf and /root/.my.cnf- mysql configuration file
/var/cpanel/databases – dbmapping files.
• Program : /usr/sbin/mysqld :/usr/bin/mysqld_safe
• Init Script : /etc/rc.d/init.d/mysql : service mysql start/stop : /scripts/restartsrv_mysql
• Data directory – /var/lib/mysql – Where all databases are stored.
• Socket file – /var/lib/mysql/mysql.sock, /tmp/mysql.sock.
PostgreSQL :
• Conf: /var/lib/pgsql/data/postgresql.conf & pg_hba.conf
• Data Directory: /var/lib/pgsql/data
• Log: /var/lib/pgsql/
Perl :
• Program :/usr/bin/perl or /usr/local/bin/perl (one should symlink to the other)
• Directory :/usr/lib/perl5/5.8.x/ or /usr/local/lib/perl5
• Version: perl -v
• Check: /scripts/checkperlmodules : /scripts/perlmods -s
• Installer: /scripts/perlinstaller : perl -MCPAN -e shell
• Build: /home/.cpan :/home/.cpcpan
Clamav :
/etc/clamav.conf – clamav (antivirus configuration file ).
Spamd :
• Directory: /etc/mail/spamassassin
• Program: /usr/bin/spamd & /usr/bin/spamc & /usr/bin/spamassassin
• Scripts: /scripts/installspam
EasyApache :
• /var/cpanel/easy/apache
• /var/cpanel/userdata
• /usr/local/apache/conf/
• /var/cpanel/templates/apache2
• /usr/local/cpanel/src/templates/apache2
• /home/cpeasyapache
• /opt
• /usr/local/cpanel/logs/easy/apache
ROR – Ruby on Rails:
• Directory: /home/username/rails_apps /home/username/.gem/ruby
• Scripts: /scripts/installruby
Tomcat :
• Directory: /usr/local/jakarta/tomcat
• Conf: /usr/local/jakarta/tomcat/conf/server.xml
Other cPanel system config :
/etc/userdomains – all primary, addons, parked,sub-domains along with their usernames are stored in this file.
/etc/cpbackup-userskip.conf – To skip files or certain accounts in backup.
/var/cpanel/resellers – Permissions for resellers.
/etc/chkserv.d – ( WHM >> Service Configuration >> Service Manager config file)
/etc/wwwacct.conf – Account creation defaults file in WHM (Basic cPanel/WHM Setup)
/etc/cpupdate.conf – cPanel Update Config (upcp)
/etc/cpbackup.conf – Backup Configuration.
/var/run/chkservd – (Main >> Server Status >> Service Status )
/var/log/dcpumon – Top log process. Daily Process logs.
/root/cpanel3-skel – Skeleton directory. (Eg: public_ftp, public_html)
/var/spool/cron – Cronjobs 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 ( Tweak Settings ).
/var/cpanel/counters – To get the counter of each users.
/var/cpanel/bandwidth – To get bandwith usage of domains.
/var/cpanel/userdata – Contains 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 user/pass data.
/var/cpanel/updatelogs – The cPanel update (upcp ) daily logs.
/var/cpanel/packages – Default and custom packages created here.
If you require help, contact SupportPRO Server Admin
