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?
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?