Web Hosting Talk







View Full Version : a script that redirects to another page when server goes down


hitman3266
08-22-2006, 05:54 AM
would it be possible for like, say you have a site up, and once it goes down it will be redirected to another page (on another server) saying that the site is temporarly unavailable...somehow to get an external check maybe? is it even possible? maybe with using some type of service? ...

tanfwc
08-22-2006, 06:56 AM
Don't think so unless you are using hardware load-balancer. :)

shinz
08-22-2006, 09:45 AM
I'm trying to solve the same problem.

Is there such a thing as dns with fail-over?
If not, i'm thinking of using one of those free dynamic dns service -

Have a cron job running on the backup server pinging the main server say every 5 minutes. When main server is down, modify ip in dns to point to backup server.

mikey1090
08-22-2006, 09:46 AM
if the site goes down no script will work

RofyHost
08-22-2006, 10:21 AM
well, you will need DNS fail over system so that when http server stops responding it automaticcaly switch to another server/site, you can use this to have your site up and running not only showing a temp error message (if you site is dynamic you have to rsync the two servers on regular basis).

gbjbaanb
08-22-2006, 05:11 PM
Have a look at something like ultramonkey (http://www.ultramonkey.org/), if you have a secondary server at the same DC, this is the best solution for fault tolerance without going overboard on super-uptime solutions.

TDMWeb
08-24-2006, 08:46 AM
Software-based failover will do the job nicely. Some third-party DNS providers will do this, some hosting companies will provide the service for servers hosted with them, and/or offer hosting packages with this set up automatically.

horizon
08-24-2006, 09:29 AM
A good way to handle this would be by purchasing a secondary DNS address that points to a default location when the primary server gets down. Some manufacturers offers this possibility to avoid confusion from their clients in order to maintain a good professional presentation and good maintenance of their website. ;)

Once the primary server gets back online, it can always be ajustable to return to it's proper location.