PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Wed Jul 15, 2020 9:42 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri May 01, 2009 8:13 am 
Offline
DevNet Resident
User avatar

Joined: Wed Jun 18, 2008 8:32 am
Posts: 1483
Location: Surrey
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


Top
 Profile  
 
PostPosted: Fri May 01, 2009 9:01 am 
Offline
DevNet Master
User avatar

Joined: Fri Jan 18, 2008 1:36 am
Posts: 3549
Location: Israel, ME
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.


Top
 Profile  
 
PostPosted: Fri May 01, 2009 9:10 am 
Offline
DevNet Resident
User avatar

Joined: Wed Jun 18, 2008 8:32 am
Posts: 1483
Location: Surrey
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.


Top
 Profile  
 
PostPosted: Fri May 01, 2009 9:15 am 
Offline
DevNet Master
User avatar

Joined: Fri Jan 18, 2008 1:36 am
Posts: 3549
Location: Israel, ME
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.


Top
 Profile  
 
PostPosted: Fri May 01, 2009 9:25 am 
Offline
DevNet Resident
User avatar

Joined: Wed Jun 18, 2008 8:32 am
Posts: 1483
Location: Surrey
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.


Top
 Profile  
 
PostPosted: Fri May 01, 2009 9:31 am 
Offline
DevNet Master
User avatar

Joined: Fri Jan 18, 2008 1:36 am
Posts: 3549
Location: Israel, ME
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)


Top
 Profile  
 
PostPosted: Fri May 01, 2009 9:35 am 
Offline
DevNet Resident
User avatar

Joined: Wed Jun 18, 2008 8:32 am
Posts: 1483
Location: Surrey
That sounds easier :)

Do I have to setup a nameserver on my local machine?


Top
 Profile  
 
PostPosted: Fri May 01, 2009 10:01 am 
Offline
DevNet Master
User avatar

Joined: Fri Jan 18, 2008 1:36 am
Posts: 3549
Location: Israel, ME
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


Top
 Profile  
 
PostPosted: Fri May 01, 2009 11:23 am 
Offline
DevNet Resident
User avatar

Joined: Wed Jun 18, 2008 8:32 am
Posts: 1483
Location: Surrey
Cool. I will have a play.

Might need some more help though :?


Top
 Profile  
 
PostPosted: Fri May 01, 2009 11:34 am 
Offline
DevNet Resident
User avatar

Joined: Wed Jun 18, 2008 8:32 am
Posts: 1483
Location: Surrey


Top
 Profile  
 
PostPosted: Fri May 01, 2009 11:46 am 
Offline
DevNet Master
User avatar

Joined: Fri Jan 18, 2008 1:36 am
Posts: 3549
Location: Israel, ME
Something like this -


Top
 Profile  
 
PostPosted: Fri May 01, 2009 12:12 pm 
Offline
DevNet Resident
User avatar

Joined: Wed Jun 18, 2008 8:32 am
Posts: 1483
Location: Surrey
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 :cry: 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.


Top
 Profile  
 
PostPosted: Sat May 02, 2009 1:20 pm 
Offline
DevNet Resident
User avatar

Joined: Wed Jun 18, 2008 8:32 am
Posts: 1483
Location: Surrey
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.


Top
 Profile  
 
PostPosted: Sat May 02, 2009 1:30 pm 
Offline
Site Admin
User avatar

Joined: Tue Dec 23, 2003 3:10 am
Posts: 11470
Location: Toronto
I believe if your primary nameservers do not succesfully make the connection, by default, it will use the secondary.

Wheres Vlad? :)


Top
 Profile  
 
PostPosted: Sat May 02, 2009 2:17 pm 
Offline
DevNet Resident
User avatar

Joined: Wed Jun 18, 2008 8:32 am
Posts: 1483
Location: Surrey
So I could simulate this by blocking port 80 (firewall) on the production box?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group