Featured Posts

Using DKIM with Exim and cPanel Update: This article is obsolete as of cPanel 11.32. To enable DKIM support, go to cPanel -> Email Authentication.   Similar to the intentions of SPF records and DomainKeys, DKIM is intended...

Readmore

Copy Outgoing Email on a cPanel Server with Exim A common request we get is how a user can automatically BCC outgoing email to another address. This is most often requested by law firms that need to be able to retain copies of communication. Forwarding...

Readmore

Do You Care About Your Customers' Data? I was working a case last week for a new client that's been hosting local business websites for over three years. As with all of my case studies, I did a short survey of the client's infrastructure, processes,...

Readmore

Tips to Reduce Your Customer Support Costs When hosting websites, whether as a mainstream hosting provider, a hobby, or to supplement another service, it's your job to make sure your customers have access to technical support in case they need...

Readmore

Roundcube: MySQL or SQLite? cPanel 11.25 introduces a new feature: The ability to have RoundCube use SQLite instead of MySQL. After benchmarking resource usage and performance, I've come to the conclusion that SQLite is definitely...

Readmore

The cPanel Admin Rss

Adding IP Addresses to a Server

Posted by Vanessa | Tagged under: , | Posted on December 28, 2009

2

In a hosted multi-site environment you may find yourself needing to add multiple IP addresses to a server. Luckily, cPanel makes it very easy to add IP addresses. This article will go over adding IP addresses to standalone servers, both through WHM and from command line on a cPanel server.

Upgrading or Downgrading MySQL

Posted by Vanessa | Tagged under: , | Posted on December 28, 2009

10

Click here for instructions on manual upgrades

 

You can easily change the major version of MySQL running on your server, keeping in mind that the actual version will be dependent on what cPanel has released in their repository. You may notice that in WHM > Tweak Settings, where MySQL upgrades and downgrades are usually done, you can no longer downgrade to versions under 5.0, nor (at the time of this writing) can you choose MySQL 5.1. Luckily cPanel gives you a way to get around this.

Fixing a Suddenly “Broken” cPanel Installation

Posted by Vanessa | Tagged under: , | Posted on December 28, 2009

1

Sometimes out of nowhere cPanel will just break. You don’t know why, you don’t know when, and you don’t know how…it just happens. In my experience it’s usually when a cPanel update fails for some reason or perl is borked, but either way – it just sucks. This article will go over how to fix a malfunctioning cPanel installation or botched upgrade.

Adding Services to Chksrvd for Monitoring

Posted by Vanessa | Tagged under: ,,, | Posted on December 28, 2009

1

Chkservd is the service in cPanel that checks to make sure that services are running, then restarts them if necessary.  It’s also responsible for the ‘Service Manager’ section in cPanel, which is also an interface where added services can be easily checked on and off.

Service files are in /etc/chkserv.d/

To add a new service, create a line in ”’/etc/chkserv.d/chkservd.conf’” in the same format as the others:

service:1

1 means the service should be enabled, 0 means it’s off.

In ”’/etc/chkserv.d”’ each service has its own file.  Create a file called as the name of the service you are monitoring.  The contents of the file are in the format of:

#SERVICE = PORT, SEND, RESPONSE, RE-START COMMAND

There are two ways that cPanel checks services with chkservd:

*Connection-based monitoring – By default, cPanel will try to connect to the service’s specified port, issue a command, and if a response is received within 10 seconds it will consider the service to be online. For instance, FTP:

service[ftpd]=21,QUIT,220,/scripts/restartsrv_ftpserver

*Process-based monitoring – cPanel will check for a specific process to determine whether it is online. For instance, named:

service[named]=x,x,x,/scripts/restartsrvr_bind,named,named|bind

If you have more than one restart command, you can separate them with semicolons in order of preference that they should be run.  Output of these commands will be logged to the chkservd.log

After you’ve created the service’s configuration file, restart chkservd:

/etc/init.d/chkservd restart

You should then see the service listed in WebHost Manager in the ‘service manager section’

Chkservd logs are in /var/log/chkservd.log.  Checks are done every 8 minutes, and everyone online service gets a +, offline services get a -.  If the service is determined to be offline, the restart command(s) specified in that service’s chkservd configuration file is issued and the output is logged.