FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Customize page when apache(HTTP) is down





pashmina
The apache in the server 2 has to restart every now and then due to the load it has to face in adding new users and so....
So is there any method to show a customized page when the apache goes down?
For instance
Quote:
Server down for maintainace please try after few minutes
mathiaus
For users to check that it is down? http://www.frihost.com/forums/vt-59449.html
Or do you mean to show instead of your page? If the latter no, simply because you'd need apache to send that page to be displayed and if it isn't working, how is it going to reach the visitor?
pashmina
yes! i meant for the visitors. Isn't there any way to do so..
Most of the time when the apache is down, the Page cannot be displayed PAGE appears. I just want to customize it.
I guess there is no way to do so.
Hunterseaker
pashmina wrote:
yes! i meant for the visitors. Isn't there any way to do so..
Most of the time when the apache is down, the Page cannot be displayed PAGE appears. I just want to customize it.
I guess there is no way to do so.

No there is no way to customize it, because the the Page cannot be displayed is displayed by your own browser and not by the server you're trying to acces.....
Animal
Apache is the HTTP server - when it goes down, HTTP requests are not able to be processed. Therefore, we would be unable to display an HTTP page at all.
pashmina
Can't the server 1 create the customized page when it goes down.
Just a though! Might be good if it had the capability!
fromegame
Code:

<?php
function pingDomain($domain){
    $starttime = microtime(true);
    $file      = fsockopen ($domain, 80, $errno, $errstr, 3);
    $stoptime = microtime(true);
    $status    = 0;

    if (!$file) $status = -1;  // Site is down
    else {
        fclose($file);
        $status = ($stoptime - $starttime) * 1000;
        $status = floor($status);
    }
    return $status;
}

$status = pingDomain("216.32.85.170");
if($status != -1) {
header("Location:xxx.frih.net");
}else{
echo "Sorry this site is offline now!";
}   

?>


Put above file at another host. And put the real website at frihost Smile
And of course, let your visitors go to the other host.
pashmina
ok i will try. the server2 's apache has been down too long.. is already been more than half an hour.
Related topics
tips tips...
My latest design....
Anime Voltage
Webpage Design Programs
Is There A Good Database-less CMS?
my site is down
Deathmetal
CSS Help...
Downtime
Stay FRI and travel?
Google
Can i install joomla or mambo on my frihost account?
Who all is in a Video Game Clan?
Server 2 Apache Down!?
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.