Everything about cPanel Directory Structure

Everything about cPanel Directory Structure

cPanel is a web hosting control panel. It is one of the most popular control panels in the web hosting field. If you are using cPanel or planning to install it on your server, it is good that you know about the cPanel directory structure. Before moving to cPanel directory structure, let’s see an overview on what a web hosting control panel is.

What is a Web Hosting Control Panel?

A webhosting control panel is a web-based interface that allows customers to manage their websites easily even without technical knowledge. There are many types of control panels in the circle of web hosting. To use a control panel, you need to install it on the server. Various common web hosting control panels are described below.






In the above list, only Webmin is available for free of cost. Remember that once cPanel installed, you cannot remove it from the server. You need to reload the server itself to remove the cPanel.

What is cPanel

cPanel is a linux-based webhosting control panel. It provides a graphical interface and tools to manage your hosting products. It is one of the most popular web hosting control panel. The control panel is easy to use and does not require any technical expertise. cPanel comes in two faces, WHM and cPanel. The WHM gives the root level access and reseller privileges as well.  cPanel control panels are available for each main accounts. Before moving to cPanel directory structure, let’s see what the directory structure means.

Directory Structure

The organization of files into a hierarchy of folders is known as the directory structure. It describes how the files are arranged in the filesystem as contents of folders and for displaying the files. The directory structures will be in a hierarchical tree model.

cPanel Directory Structure

Now let’s see the cPanel Directory Structure in detail. The first directory we are going to see is Apache – /usr/local/apache. Let’s see the sub classifications.



  • Apache – /usr/local/apache
  • bin- apache binaries are stored here: httpd, apachectl, apxs
  • conf – configuration files are stored here.– httpd.conf: php.conf
  • domlogs – domain access and stat log files for all domains are stored in this location
  • htdocs – The default apache DocumentRoot location
  • include – Here the header files are stored.
  • libexec – shared object (.so) files are stored here:  libphp4.so,mod_rewrite.so
  • logs – apache logs: access_log, error_log, suexec_log
  • man – apache manual pages
  • icons – icon/jpg/gif images
  • modules – shared object (.so) files are store here: Apache-2.x+
  • 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



  • Conf : /etc/exim.conf – exim main configuration file is stored here.
  • /etc/localdomains – list of domains allowed to relay/receive mail
  • Log : /var/log/exim_mainlog – incoming/outgoing mail logs
  • 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
  • Cpanel script to restart exim – /scripts/restartsrv_exim
  • Email forwarders and catchall address file – /etc/valiases/domainname.com
  • Email filters file – /etc/vfilters/domainname.com
  • POP user authentication file – /home/username/etc/domainname/passwd
  • Catchall inbox – /home/username/mail/new
  • POP user inbox – /home/username/mail/domainname/popusername/new
  • POP user spambox – /home/username/mail/domainname/popusername/spam• Program : /usr/sbin/exim (suid – -rwsr-xr-x 1 root root )
  • Init Script: /etc/rc.d/init.d/exim : /scripts/restartsrv_exim : service exim restart
  • Check queue: exim -bpc


  • Program :/usr/sbin/proftpd
  • Init Script :/etc/rc.d/init.d/proftpd : /scripts/restartsrv_ftpserver
  • Conf: /etc/proftpd.conf
  • Log: /var/log/messages, /var/log/xferlog
  • Accounts file – /etc/proftpd/$username -all ftp accounts are stored here



  • Program : /usr/sbin/pure-ftpd
  • Init Script :/etc/rc.d/init.d/pure-ftpd : /scripts/restartsrv_ftpserver
  • Conf: /etc/pure-ftpd.conf
  • Accounts file: /etc/proftpd/$username (all ftp accounts are stored here)
  • Anonymous ftp document root – /etc/pure-ftpd/ip-address



  • Program : /usr/sbin/mysqld :/usr/bin/mysqld_safe
  • Init Script : /etc/rc.d/init.d/mysql : service mysql start/stop : /scripts/restartsrv_mysql
  • Conf : /etc/my.cnf, /root/.my.cnf
  • Data directory – /var/lib/mysql (location for all database storage)
  • Database naming convention- username_dbname (eg: john_sales)(DBMapping)
  • Log: Startup errors – /var/lib/mysql/hostname.tld.err
  • Socket file – /var/lib/mysql/mysql.sock, /tmp/mysql.sock



  • Program :/usr/local/sbin/sshd
  • Init Script :/etc/rc.d/init.d/sshd – /scripts/restartsrv_sshd – service sshd restart
  • Conf: /etc/ssh/sshd_config
  • Log: /var/log/messages



  • Program :/usr/bin/perl or /usr/local/bin/perl
  • 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


  • Program: /usr/sbin/named
  • Init Script: /etc/rc.d/init.d/named
  • Config: /etc/named.conf
  • Zone files:/var/named/
  • Log: /var/log/messages: /var/named/data/named.run



  • Program: /usr/lib/courier-imap/libexec/couriertcpd
  • Init Script: /etc/init.d/courier : /scripts/restartsrv_courier
  • Config: /usr/local/libexec/courier-imap
  • Log: /var/log/maillog



  • Program: /usr/sbin/dovecot
  • Init Script: /etc/init.
  • Config: /etc/dovecot.conf
  • Log: /var/log/maillog



  • /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



  • cPanel installation directory structure – /usr/local/cpanel
  • 3rdparty/ – tools like fantastico, mailman files are located here
  • addons/ – AdvancedGuestBook, phpBB, etc.
  • base/ – phpmyadmin, squirrelmail, skins, webmail, etc.
  • bin/ – cpanel binaries
  • cgi-sys/ – cgi files such as cgiemail, formmail.cgi, formmail.pl, etc.
  • logs/ – cpanel access_log, error_log, license_log, stats_log
  • whostmgr/ – whm related files
  • base/frontend – cPanel related files – themes+ perl/ – internal Perl modules for compiled binaries are here.
  • etc/init – init files for cPanel services are stored here.



  • WHM related files – /var/cpanel – whm files are present here.
  • bandwidth/ – rrd files of domains
  • username.accts – reseller accounts are listed here.
  • packages – list of hosting packages are here
  • root.accts – list of root owned domains are here
  • suspended – list of suspended accounts are here
  • users/ – cpanel user file: theme, bwlimit, addon, parked, sub-domains all are listed here
  • zonetemplates/ – dns zone template files are taken from here


Important cPanel/WHM files (& Config files)

  • /usr/local/apache/conf/httpd.conf – This is the apache configuration file.
  • /etc/exim.conf – This is the email server configuration file.
  • /etc/named.conf – This is the name server (named) configuration file
  • /etc/proftpd.conf – This is the proftpd server configuration file
  • /etc/pure-ftpd.conf – This is the pure-ftpd server configuration fileetc/valiases/domainname (catchall and forwarders are set here)
  • /etc/vfilters/domainname – email filters are set here
  • /etc/userdomains – all domains are listed here addon, parked, subdomains, and the usernames
  • /etc/localdomains – exim related file all domains should be listed here to be able to send/receive emails
  • /etc/cpbackup-userskip.conf
  • /etc/sysconfig/network – Networking Setup
  • /etc/hosts
  • /etc/resolv.conf – Networking Setup–> Resolver Configuration
  • /etc/nameserverips – Networking Setup–> Nameserver IPs ( for resellers to give their nameservers )
  • /var/cpanel/resellers – For addpkg, etc permissions for resellers.
  • /etc/chkserv.d – Main » Service Configuration » Service Manager
  • /etc/ipaddrpool – free IP addresses
  • /etc/ips.dnsmaster – nameserver IP’s
  • /etc/domainips –  dedicate IPʼs set for specific domains
  • /etc/wwwacct.conf – account creation defaults file in WHM (Basic cPanel/WHM Setup)
  • /etc/cpupdate.conf – This is the Update Config file
  • /etc/cpbackup.conf – Configure Backup
  • /etc/clamav.conf – clamav (antivirus configuration file )
  • /etc/my.cnf – This is the mysql configuration file
  • /usr/local/lib/php.ini – This is the php configuration file
  • /etc/ips – IP addresses on the server (excluding shared IP’s) (IP Functions–>Show IP Address Usage )
  • /var/run/chkservd – Main » Server Status » Service Status
  • /var/log/dcpumon – top log process
  • /root/cpanel3-skel – skeleton directory. Eg: public_ftp, public_html. (Account Functions)
  • /var/spool/exim/input – Mail queue
  • /var/spool/exim/msglog – email message logs
  • /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 – 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 user/pass data
  • /var/cpanel/updatelogs – upcp daily logs
  • /var/cpanel/horde – version file, backups and logs are stored here
  • /var/cpanel/roundcube – version file, backups and logs stored here
  • /var/cpanel/squirrelmail – version file stored here
  • /var/cpanel/packages – default and custom packages created herevar/cpanel/databases – dbmapping files
  • /var/cpanel/cpanelsync – DNS Clustering files

If you need any further assistance please reach our support department.

  • 0

How to Enable Plaintext Authentication in Dovecot?

How to Enable Plaintext Authentication in Dovecot? Dovecot is an IMAP or POP3 server for...

Install Apache Tomcat using EasyApache4

Install Apache Tomcat using EasyApache4 The Apache Tomcat is an Apache module that provides a...

How to Enable Extended Logging in Exim

How to Enable Extended Logging in Exim The extended Exim logs in cPanel server will help you to...

Maximum number of connections from user+IP exceeded

Maximum number of connections from user+IP exceeded If you are getting an error like ‘ Error –...

How To Set Up Remote Access Key in WHM

How To Set Up Remote Access Key in WHM Remote Access Key is a cPanel feature that allows...