#1 (permalink)  
Old 11-20-2009, 12:24 AM
Registered User
 
Join Date: Nov 2009
Posts: 1
control1110 is on a distinguished road
Seamless way to change IP on website

I have a dedicated server with 5 ips. I want to change the ip for one of my sites to a different ip. I am told pretty much the site has to be down for a few hours while it propagates.My host tell me there is nothing I can do, but let it be down. Is there a Seamless way to change this?

Last edited by control1110; 11-20-2009 at 12:26 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 11-20-2009, 04:54 AM
cPanel Partner NOC
cPanel Partner NOC Badge
 
Join Date: Apr 2008
Location: PK
Posts: 232
JPC-Howard is on a distinguished road
Quote:
Originally Posted by control1110 View Post
I have a dedicated server with 5 ips. I want to change the ip for one of my sites to a different ip. I am told pretty much the site has to be down for a few hours while it propagates.My host tell me there is nothing I can do, but let it be down. Is there a Seamless way to change this?
You can change TTL in the DNS zone of the site to a much lower value and change the site's IP after the current value of TTL before editing. Say your current value of TTL is 86400, you can lower this value and change site's IP after 24 hours (86400 seconds).
__________________
JaguarPC
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 11-20-2009, 05:48 AM
Registered User
 
Join Date: Apr 2009
Posts: 225
InstaCarma_Tech is on a distinguished road
Nowadays, DNS propagation does not take long hours. If you do it in the off-peak hours then you should be all good.
__________________
InstaCarma
Outsourced Web Hosting Technical Support and Server Management

To visit out Blog , click here
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 11-20-2009, 02:48 PM
Registered User
 
Join Date: Nov 2007
Posts: 99
wizzy420 is on a distinguished road
Quote:
Originally Posted by InstaCarma_Tech View Post
Nowadays, DNS propagation does not take long hours. If you do it in the off-peak hours then you should be all good.
OP, don't take this persons advice and blindly do it at "off-hours". The propagation can take as long as the TTL is set for.

Listen to the other person. Check the TTL values on the zone and hostnames, note what they are. Propagation can take up to that many seconds. If you're okay with it, then do it.

If not set the TTL low (like 300 = five minutes) and then after updating zone wait at least (old TTL seconds) before changing the IP. Once you have done the change you can up the TTL.

If you have the TTL set to 86400 and listen to the advice of "do it off-peak" you really will have some people not getting the site up to 24-hours later, with an average prop time of 12-hours.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 11-20-2009, 09:50 PM
cPanel Partner NOC
cPanel Partner NOC Badge
 
Join Date: Mar 2003
Location: Washington DC
Posts: 639
eth00 is on a distinguished road
If you don't mind getting your hands dirty and are familiar with apache take a copy of the domains vhost and put it in one of the configs that cpanel has that do not get updated. Then change the ip. Now you will have 2 vhosts, one for the old IP and one for the new. No matter what IP they hit they still get the site.

If you don't do it this way lowering the TTL a few days before and then doing it late at night is your best bet.
__________________
John W
Security and general linux how-to's
w w w . t o t a l s e r v e r s o l u t i o n s . c o m
Tss -- Live Support! Tweaking, Securing, 24x7 Service Monitoring, Monthly Management, Migrations, Restores, Optimization, Consulting
English And Spanish Support!
We do it all @ TotalServerSolutions
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 11-21-2009, 05:29 AM
d_t d_t is offline
Registered User
 
Join Date: Sep 2003
Location: Bucharest
Posts: 181
d_t is on a distinguished road
eth00 is right, this is the best way to do (having 2 vhosts until new IP propagate). This should be a feature for next cPanel versions.
__________________
Joomla & Magento cPAddons
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 11-21-2009, 02:05 PM
Registered User
 
Join Date: Jan 2005
Location: Earth
Posts: 884
madaboutlinux is on a distinguished road
Quote:
Originally Posted by InstaCarma_Tech View Post
Nowadays, DNS propagation does not take long hours. If you do it in the off-peak hours then you should be all good.
What "eth00" said is possible but what "InstaCarma_Tech" said is not false either. Nowadays, propagation does take a 2-3 hours and if you change the website IP during off hours, you should be fine.
__________________
Linux WebHosting Blog.
http://linuxhostingsupport.net/blog/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 11-22-2009, 02:50 AM
d_t d_t is offline
Registered User
 
Join Date: Sep 2003
Location: Bucharest
Posts: 181
d_t is on a distinguished road
@madaboutlinux, do you think few years ago DNS propagation took more? It's all about TTL but some ISP DNS servers ignore the value from the zone and keep the old info in cache. More, if you check the logs after you move a website, you can see that some spiders (like yahoo) keep visiting the old IP for days.

Why should you have a website down for 2-3 hours when you can keep it alive on the old IP (whenever is possible).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 11-26-2009, 08:08 PM
cPanel Partner NOC
cPanel Partner NOC Badge
 
Join Date: Mar 2003
Location: Washington DC
Posts: 639
eth00 is on a distinguished road
Quote:
Originally Posted by d_t View Post
Why should you have a website down for 2-3 hours when you can keep it alive on the old IP (whenever is possible).
Exactly! It only takes a few minutes to setup the other vhost, really 1-2 if you know what you are doing. That 1-2 minutes will save you a lot of possible headaches, why not just do it?
__________________
John W
Security and general linux how-to's
w w w . t o t a l s e r v e r s o l u t i o n s . c o m
Tss -- Live Support! Tweaking, Securing, 24x7 Service Monitoring, Monthly Management, Migrations, Restores, Optimization, Consulting
English And Spanish Support!
We do it all @ TotalServerSolutions
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 11-30-2009, 07:08 AM
Registered User
 
Join Date: Nov 2007
Posts: 32
keddie is on a distinguished road
I have a similar need to migrate an important account to a new IP.

Having an apache vhost entry for both IPs sounds like a good solution.

Would this work with SSL?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 11-30-2009, 12:08 PM
Registered User
 
Join Date: Nov 2007
Posts: 32
keddie is on a distinguished road
So, I've been doing some experimenting with the duplicate vhosts on a test domain.

I've been using the following doc for guidance:

cPanel - The Easy Apache Configuration System - Adding Custom Directives to httpd.conf

My first mistake was to take the httpd.conf comments too literally:

# To customize this VirtualHost use an include file at the following location
# Include "/usr/local/apache/conf/userdata/std/2/test/test.abc123.co.uk/*.conf"

I created an include file in the specified location which consisted of a copy and paste of the standard (non SSL) vhost section in httpd.conf. I then ran:

/scripts/verify_vhost_includes

Which returned:

Testing /usr/local/apache/conf/userdata/std/2/test/test.abc123.co.uk/std.conf...ok

then I ran:

/scripts/ensure_vhost_includes --user=test

Which returned:

Syntax error on line 1 of /usr/local/apache/conf/userdata/std/2/test/test.abc123.co.uk/std.conf:
<VirtualHost> cannot occur within <VirtualHost> section

So I now see that using this kind of include won't work for creating duplicate vhosts as it applies literally to the directives *within* the <VirtualHost> tags.

I'm now thinking I need to use another included method...

Last edited by keddie; 11-30-2009 at 04:24 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 11-30-2009, 05:56 PM
Registered User
 
Join Date: Nov 2007
Posts: 32
keddie is on a distinguished road
Thumbs up

The solution is extremely simple and it works with SSL

Here's what I did:

1) Edit /usr/local/apache/conf/httpd.conf and copy the current vhost entries that you want to duplicate.
2) In WHM, go to: Main >> Service Configuration >> Apache Setup >> Include Editor.
3) Scroll down to "Post VirtualHost Include" and select "All versions" from the dropdown.
4) Paste the vhost directives in to the box and then update the IP addresses to the new ones.
5) Click "Update" then "Restart Apache"

I used my local hosts file to test the new aliased IPs and they worked great.

Thanks for the pointers OPs

Al
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 12-03-2009, 12:01 AM
paulkoan's Avatar
Registered User
 
Join Date: Nov 2006
Posts: 58
paulkoan is on a distinguished road
The term "propagate" suggests to many that something actually is moving across the internet and is no doubt the source of the earlier poster's confusion in thinking that this movement will somehow go quicker at "night" when things are less busy.

It is a convenient word to use for those who understand what it is actually saying but we could do with something else for those who don't.

To anyone happening across this thread, it works like this: You request the IP for a server from your local DNS server. The DNS server will go and ask the authoritative DNS server for that domain, who will respond with the IP address, plus a TTL value which lets the local DNS server know how long that response is good for. Lets say it gives a TTL of a week. This means that for subsequent requests for this same server, the local DNS server will not bother asking the authoritave DNS as it already knows the answer - until the week expires.

So if you change your IP address during this week, then this change will not 'propagate' to this local DNS server until a week has passed since the last time it asked, whereupon it will go back to the authoritative DNS server and get the new IP.

As DNS servers all over the planet will be asking the question at different times, some will update immediately, some will take a full week.
__________________
ServWise Advanced Hosting - Better, Faster, Smarter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seamless way to change IP on website ?? wosiho99 cPanel Newbies 5 10-28-2009 08:12 PM
I cannot access my website after change IP address. Neiltan cPanel and WHM Discussions 3 09-14-2007 04:31 AM
Is 'seamless' copying of hosting accounts possible, including email? spaceman cPanel and WHM Discussions 5 03-22-2006 08:12 AM
Seamless Server Migration? Daemonia cPanel and WHM Discussions 9 10-15-2005 09:58 AM
You will NOT be able to access your website until you change..DNS nuchyld7 cPanel Newbies 6 09-03-2004 04:14 PM


All times are GMT -5. The time now is 06:59 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© cPanel Inc