Blogs‎ > ‎

Cpanel - Couple of Post Install Config Hacks

posted 20 Jun 2016, 12:59 by Andrew at Lycom   [ updated 20 Jun 2016, 13:00 ]
I have done quite a lot of work with Cpanel for a couple of clients recently.  These are a couple of 'extra' config steps that I found useful.

Change the default cpanel error page

Simplicity itself -  you know the defaultwebpage.cgi ( or /cgi-sys/defaultwebpage.cgi ) landing page for errors.

In WHM, go to https://documentation.cpanel.net/display/1144Docs/Web+Template+Editor and you can customise / personalise the message text to reflect your needs.

Add custom directories to the Cpanel system backup

Installed some custom software? Got some application dirs (e.g. /opt/nginx) you want to back up that don't sit in the default places that the Cpanel system backup will back up?

So, go to "WHM >> Backup Configuration" and ensure "Backup System Files" is enabled

Create a file in the "/var/cpanel/backups/extras/" directory. e.g:
touch /var/cpanel/backups/extras/opt

Edit this file and add a line for the "/opt/nginx" directory:

Code:
# cat /var/cpanel/backups/extras/opt
/opt/nginx
Check (or force) your next backup, then inspect the catalogue and confirm this dir is included in the backup.  Job done. (No need for any wacky cron copy scripts to do the same thing.)