Hi, I have a dedicated server (lamp & cpanel) under which I host different web domains: www.domain1.com, www.domain2.com, www.domain3.com, www.domain4.com, ... I'm upset because sometimes (rarely, though) I discovered (by opening www.domainX.com in the browser) that my domains did not work and I had to restart apache using my root privileges. Do you have any idea how can I automatically check if such a situation occurs again? A cron job or something like that? Thanks a lot for your time, Sorin
You could set up a cron job to ping the domains required or something similar. If the ping fails to resolve the host then you could have an email sent to you. This wont help if the apache server is running and something else has gone wrong though. If you want me to work on such a script PM me back. I'll quickly conjure one up and send it over
If your apache is running well, your domains will be ok. If you found that your site down (and restart apache makes it work), that means that there's some problem with apache. You can check the error logs to see what happen. Or, see Automatic start Apache when it died/down!