Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 13th January 2008, 16:23
raypettersen raypettersen is offline
Member
 
Join Date: Oct 2007
Posts: 33
Thanks: 1
Thanked 0 Times in 0 Posts
Default Moving websites without downtime (apache2)

Hi

Im in the early process of planning a copy of old websites onto a new server location. Has anyone here done so, without downtime? What would be the best way to accomplish a data transfer, and rerouting web traffic?

Thanks in advance.
Reply With Quote
Sponsored Links
  #2  
Old 14th January 2008, 17:00
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Are these static or dynamic web sites? If they are just static HTML files, you can simply copy them over. If they are dynamic and use a MySQL database, you should make sure that the web sites on the old server already use the database on the new server, i.e., both web sites (on the old and the new server) should use the new database to prevent inconsitent data.
You can then change the DNS records, maybe wait 14 days to make sure the DNS changes have fully propagated, and switch off the old server.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 14th January 2008, 17:32
raypettersen raypettersen is offline
Member
 
Join Date: Oct 2007
Posts: 33
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi, and thankyou for your reply.

These pages are not static, but php webpages that use a single mysql database. I agree on the database move, but the webpages are constantly changing. We host these pages, so im a bit worried that the move will result in some kind of downtime or that a customer changes something on their website, and this change is not copied to the new server.

What would you suggest here? Perhaps a cronjob, with Rsync that copies over differential files if found, and with a newer date?
Reply With Quote
  #4  
Old 15th January 2008, 18:30
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by raypettersen
What would you suggest here? Perhaps a cronjob, with Rsync that copies over differential files if found, and with a newer date?
Yes, something like this: http://www.howtoforge.com/mirroring_with_rsync
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 16th January 2008, 09:55
raypettersen raypettersen is offline
Member
 
Join Date: Oct 2007
Posts: 33
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thankyou for your reply falco.

I have one finale question im hoping you could provide an answer to. How do I make apache on the old server, relay a site to the new server adress? I would like apache to redirect our customers one by one to the new server, when we have everything up and running.

This would enable us to do the dns changes without interruption. A friend of mine mentioned something like "mod proxy" (not sure if i remembered it correctly). Is that the way to go?
Reply With Quote
  #6  
Old 17th January 2008, 16:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by raypettersen
This would enable us to do the dns changes without interruption. A friend of mine mentioned something like "mod proxy" (not sure if i remembered it correctly). Is that the way to go?
That should work, but I think I'd try smoe mod_rewrite rules instead: http://httpd.apache.org/docs/2.2/misc/rewriteguide.html
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 20th January 2008, 23:19
raypettersen raypettersen is offline
Member
 
Join Date: Oct 2007
Posts: 33
Thanks: 1
Thanked 0 Times in 0 Posts
Default

These rules are written in .htaccess files?

How would I redirect one website to another server using IP instead of a web adress? Most of the examples use explicite webadress redirects.
Reply With Quote
  #8  
Old 21st January 2008, 19:00
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

[QUOTE=raypettersen]These rules are written in .htaccess files?OTE]Yes, or directly in the vhost configuration.

Quote:
Originally Posted by raypettersen
How would I redirect one website to another server using IP instead of a web adress? Most of the examples use explicite webadress redirects.
Replace the hostnames with the IP address. Please note that this only works for IP-based hosting, not name-based hosting.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SSI with Apache2 on Debian jchaven Server Operation 7 25th August 2008 17:06
Random "forbidden" error with websites kokez Installation/Configuration 33 24th July 2007 13:21
Apache2 without APXS ctroyp Installation/Configuration 8 29th January 2007 03:05
Web server offline after php4 and apache2 upgrade dfriis Installation/Configuration 11 7th December 2006 16:14
PHP on Apache2 no longer works after ISPconfig azorman Installation/Configuration 6 23rd July 2006 22:06


All times are GMT +2. The time now is 00:04.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.