Domain redirect to Backup server if main server is down?
Moderator: General Moderators
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Domain redirect to Backup server if main server is down?
Is it possible to have a domain redirect to another server (backup) if the main server can not be found (down)?
If so, how? and where? on the domain?
Cheers
If so, how? and where? on the domain?
Cheers
Re: Domain redirect to Backup server if main server is down?
The main way I know of to implement this is by clustering your servers. Linux-HA and Heartbeat are the way to go if you are using Linux. http://www.linux-ha.org/HomePage
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: Domain redirect to Backup server if main server is down?
Yep using linux.
Was not thinking of heart beat, but thinking more for, if I want to do some major maintence to the production server, then I could switch on the backup machine and turn off apache on the production while I do maintence (i.e. reboots and stuff).
Did not want the backup machine on all the time, only when I need too.
Was not thinking of heart beat, but thinking more for, if I want to do some major maintence to the production server, then I could switch on the backup machine and turn off apache on the production while I do maintence (i.e. reboots and stuff).
Did not want the backup machine on all the time, only when I need too.
Re: Domain redirect to Backup server if main server is down?
Ah, I see
I thought you wanted a fail-over system
Do you have a dedicated server? if so you could run virtualized apache instances on it and switch the routing between them when you take one offline.

Do you have a dedicated server? if so you could run virtualized apache instances on it and switch the routing between them when you take one offline.
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: Domain redirect to Backup server if main server is down?
Yep I have a dedicated server.
But I still think I explained myself badly. When I run maintence on the production server I want to take it offline completely and have the websites run on a similar server at home.
But I still think I explained myself badly. When I run maintence on the production server I want to take it offline completely and have the websites run on a similar server at home.
Re: Domain redirect to Backup server if main server is down?
I'm guess I over complicated it then 
You can add your home server as an alternative name server for the domain (where you registered it). When your server is down it will go to second server to resolve the domain (there you can route it to wherever you'd like)

You can add your home server as an alternative name server for the domain (where you registered it). When your server is down it will go to second server to resolve the domain (there you can route it to wherever you'd like)
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: Domain redirect to Backup server if main server is down?
That sounds easier 
Do I have to setup a nameserver on my local machine?

Do I have to setup a nameserver on my local machine?
Re: Domain redirect to Backup server if main server is down?
If you are running linux on it it should already be installed (BIND ships with most distributions). You just need to setup the domain-name to ip matching I think. Probably Vladsun has more input on this
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: Domain redirect to Backup server if main server is down?
Cool. I will have a play.
Might need some more help though
Might need some more help though

- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: Domain redirect to Backup server if main server is down?
How do I do that?You just need to setup the domain-name to ip matching I think
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: Domain redirect to Backup server if main server is down?
Thanks, I am having a read.
Installing Fedora10 now and hopefully set up the local failover server today/tomorrow.
I have done a lot of maintenance on my production server and it needs a reboot, but there is a chance it wont turn back on
and i cant afford for it to be down. This is not ideal, but at least the websites will still be live even if it is local - if I manage to get it all working.
Installing Fedora10 now and hopefully set up the local failover server today/tomorrow.
I have done a lot of maintenance on my production server and it needs a reboot, but there is a chance it wont turn back on

- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: Domain redirect to Backup server if main server is down?
Ok, server is pretty much setup with IPs, websites, databases.
But I just realised something, but correct me if I am wrong. If my production server is down but its nameservers are fine (different server), users will see an error message (page cannot be displayed or something to that effect). They would only be redirected to my local machine by the secondary nameserver if the primary nameserver is down? If this is the case, it is not what I was trying to achieve, I was trying to...if my production server is down, go to the backup server.
But I just realised something, but correct me if I am wrong. If my production server is down but its nameservers are fine (different server), users will see an error message (page cannot be displayed or something to that effect). They would only be redirected to my local machine by the secondary nameserver if the primary nameserver is down? If this is the case, it is not what I was trying to achieve, I was trying to...if my production server is down, go to the backup server.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Domain redirect to Backup server if main server is down?
I believe if your primary nameservers do not succesfully make the connection, by default, it will use the secondary.
Wheres Vlad?
Wheres Vlad?

- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: Domain redirect to Backup server if main server is down?
So I could simulate this by blocking port 80 (firewall) on the production box?