During my programming work I had to do some system administration tasks, and since a while I'm also maintaining some servers. This is a log for the problems I find - and hopefully their solutions.

Friday, April 15, 2005

Moving a site

I wake up in the morning, 8AM, very early for me, and what do I see? The site's DNS I expected to change during the night displays another user's site. This is crazy, the new server is supposed to host the site well, I've tested that yesterday night, so what's wrong? After a coffe and two cigarettes, I've found it:
  • The DNS got changed during the night as I expected, just TTL was quite high, and my laptop had the old address cached
  • But not the old server
  • And add to the chaos that apache got restarted on the old server too
  • Which meant that if somebody requested the site from the old server got another page, because the server didn't think he's supposed to serve pages for this domain
  • Which is exactly what happened to me
  • (And to a few other visitors too, unfortuantely)
Quick'n'dirty solution: I've lied to the old server that he's still in charge of this domain name by adding a line to /etc/hosts... After an apache restart, all's fine now, regardless of how fresh or how old your DNS record is. Now off to have a breakfast.

0 Comments:

Post a Comment

<< Home