|
|||
|
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. |
|
|||
|
Quote:
__________________
JaguarPC |
|
|||
|
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 |
|
|||
|
Quote:
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. |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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.
|
|
|||
|
@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). |
|
|||
|
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 |
|
|||
|
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. |
|
|||
|
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 |
|
||||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |