Make cPanel restart Apache automatically as needed?

0884094

Member
Nov 14, 2013
17
7
53
cPanel Access Level
Root Administrator
Hi all, I want cPanel/WHM to automatically restart the Apache service if it is down. Is there a built-in feature to make this happen?

A few times a year, our cPanel server completely dies -- either shuts off or becomes completely unresponsive -- and so we reboot it. But then after the reboot, Apache isn't responsive, and we have to restart the service (or just reboot the server again). I've coded an AWS rule to automatically reboot when the server dies, and that works, but it comes back up in this state where Apache isn't working. I know that cPanel is aware that Apache isn't working because I get an email from chkservd saying "The service “httpd” appears to be down". That same email has a field "Number of Restart Attempts: 1" but there's no indication that it's tried to restart the service at all, and nothing ever works until a person logs in to restart everything. I think if I could make chkservd do 3x restart attempts instead of 1x it would fix my issue... any way to do that?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello,

You can enable monitoring for Apache via:

"WHM Home » Service Configuration » Service Manager"

If it isn't working as expected, feel free to open a support ticket using the link in my signature so we can take a closer look.

Thank you.