The attached patch extends /etc/init.d/apache2 by an option/function "check" which sends HTTP HEAD requests to all listening ip+port sockets to see if apache is still alive.
Created attachment 81163 [details, diff]
Patch for /etc/init.d/apache2
It should be considered kind of proof-of-concept.
It depends on lsof, grep, cut, sort, uniq, head, nc and openssl.
Created attachment 81165 [details]
Screenshot of /etc/init.d/apache2 check
Created attachment 81166 [details]
Screenshot of /etc/init.d/apache2 check -- with failed checks
There are many software packages out there that do checking of this type, it's not really appropriate for an init script.