Utilize multiple hosting accounts

I have several hosting accounts ranging from shared hosting to VPS. Besides their hosting duties, I also assigned them some additional tasks.

Install cron jobs on a shared hosting account to ping the other servers for uptime. A simple PHP script like this can do the job:

<?php

$url = "http://www.domain.com";

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);

curl_setopt($ch, CURLOPT_HEADER, 0);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_exec($ch);

if (curl_errno($ch) != 0) {

  $subject = "Site is down";

  $message = "Site is down at " . date("Y-m-d H:i:s");

  mail("webmaster@domain.com", $subject, $message);

  echo date("Y-m-d H:i:s") . " $url is down \n";

} else {

  echo date("Y-m-d H:i:s") . " $url is up \n";

}


curl_close($ch);

?>

Also, there are several sites that offer free domain monitoring like:

SiteUptime Website Monitoring

Montasitic 

Both of them are pretty solid based on my experience. SiteUptime also offers pinging from west coast server or east coast server. With the combination of the free service and your own monitoring, you can get a decent idea about the stability of the domain you are trying to keep an eye on.

 

Use one account for CVS code repository.

CVS is developer's friend to maintain code.

On server side, to create a CVS repository we can run this command:

cvs init -d ~HOME/project_cvs

On client side, there is a pretty nice tool we can use for CVS utility: Tortoise CVS.

 

Most shared hosting services are loaded utilities; with a little additional SSH can be available too. So why not use them.

This entry was posted in server setup. Bookmark the permalink.

2 Responses to Utilize multiple hosting accounts

  1. Avoyan says:

    Also try http://mon.itor.us – very powerful monitoring service, also track visits in addition to uptime and performance

  2. Aaron says:

    I prefer SVN to CVS.. It’s come a long way and blows away CVS as far as I can tell. Another good monitoring service is http://www.ezwebsitemonitoring.com/ – does checks every 5 mins and also weekly checks of keywords, SEO factors, and competitors. Check it out if you have time.

Comments are closed.