1

So, I've this situation:

A server (under CentOS) with a lot of domains with around 2 TB of data under them, and I'm migrating it all to another machine with faster I/O. The migration details / software are not important here.

Due to some internal reasons, I'll image the entire system and deploy it into the new machine and then make the proper adjustments. For this will have to take the machine down and wait an hour or two for the image to be transferred.

My question is: Whats the best way to display a static webpage saying the website is currently unavailable for maintenance? Without having the change name servers for all the domains, and while the real server is offline?

All the domains on that server are currently pointed to name servers ns1.example.com and ns2.example.com.

My ideia was to change ns2.example.com IP from the real server to the small VPS hoping that everyone surfing a domain pointed there would end up on the small VPS displaying a static page saying the website was currently unavailable for maintenance.

If I'm correct, how can I configure bing9 and a web server like lighttpd to reply to incoming DNS queries thought ns2.example.com with it's own IP an then lighttpd show a static page for any domain? like a wildcard...

Thank you.

  • 3
    How many IP addresses does the server has? Is it possible to setup a new VPS with the same IP address? I would not recommend making any changes at the DNS level, as some client might cache the DNS records for a longer time, even if you set the TTL value to a very small number. – Daniel t. Mar 1 '15 at 22:38
  • You've a valid point. I could indeed move the 3 IPs to the small VPS while the image is not copied over the the new server... – TCB13 Mar 1 '15 at 23:09
0

A couple of days before the big move, you could push all traffic to CloudFlare, even a free plan would suffice. When the server is down for the migration, you could tell CloudFlare to display the "please come back later" page. Then, you could point CloudFlare to the new server when it's up and then switch the DNS off CloudFlare onto the new server, CloudFlare catching any requests sent to old IPs. You shouldn't lose any requests this way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.