Where Does cPanel Put It?

I can think of a few things that are wrong with that title but in all seriousness…don’t you ever wonder where cPanel stores the config changes that you make in WHM?  Automation is the key nowadays, and lately that’s required me to get a little down and dirty with cPanel to find its deepest secrets. *This information is not official documentation, nor is it backed up by cPanel or set in stone.  In other words, don’t blame me if you mess up your server.

These are files that store the information read and used by WHM (as of 11.23.6)

IP addresses: /etc/ips

Reserved IPs: /etc/reservedipsReserved IP reasons: /etc/reservedipreasonsIP address pool: /etc/ipaddrpoolAccess hash (WHM remote access key): /home/user/.accesshash or /root/.accesshashcPanel update preferences: /etc/cpupdate.confBasic cPanel/WHM setup:  /etc/wwwacct.confSystem mail preferences: /etc/localaliasesExim open relay list: /etc/alwaysrelayServer-wide max emails per hour: /var/cpanel/maxemailsperhourTweak settings: /var/cpanel/cpanel.configPackages: /var/cpanel/packages/Features: /var/cpanel/features/User data: /var/cpanel/users/ and /var/cpanel/userdataApache templates: /var/cpanel/templates/apache(1,2)Exim config template: /etc/exim.conf.localoptsExim mail IPs: /etc/mailipsrDNS for mail ips: /etc/mail_reverse_dnsClustering: /var/cpanel/cluster/root/configService manager: /etc/chkserv.dUsers and their domains: /etc/userdomainsUsers and their main domains: /etc/trueuserdomainsUsers and their owners: /etc/trueuserownersMain cPanel IP: /var/cpanel/mainipcPanel version: /usr/local/cpanel/versionResellers: /var/cpanel/resellersReseller nameservers: /var/cpanel/resellers-nameservers

These are a few scripts that you can use to achieve the same  results of their WHM equivalents:

  • Initialize quotes: /scripts/initquotas
  • Compile Apache: /scripts/easyapache  (you can pass additional options – see EasyApache 2 docs)
  • Update cPanel: /scripts/upcp
  • Enable/disable tweak settings: /scripts/smtpmailgidonly on|off
  • Change PHP API and suExec settings: /usr/local/cpanel/bin/rebuild_phpconf
  • Suspend an account: /scripts/suspendacct <user> <reason>
  • Terminate an account: /scripts/killacct <user>

Obviously there are a ton more, and just about anything done in WHM can be done directly on the server.  The main things to remember:

Scripts are mainly stored in /scripts and /usr/local/cpanel/bin

Data files are in /var/cpanel

Config files are in /etc/ and /usr/local/cpanel

  • 1 Пользователи нашли это полезным
Помог ли вам данный ответ?

Связанные статьи

How to Move Accounts From One cPanel Server To Another ?

  This tutorial explains a simple, straightforward method for migrating cPanel accounts from...

How do I set the Primary Interface in WHM?

Under Basic cPanel/WHM Configuration, there is an area called Primary Interface. By default, if...

How to install cPanel on CentOS

Installation Notes A CentOS or Red Hat server that is going to have cPanel installed needs a...

Why is cPanel/WHM not loading?

There are two main reasons why cPanel/WHM isn't loading that we've seen.Brand New ServerIf you...

How to Configure WHM / CPANEL with a Valid SSL Certificate

Fix a Broken SSL Certificate for WHM port 2087 and cPanel port 2083Improve your Server Security -...