Topic: taking site down temporarily while installing new version?

I suppose this is the best forum for this question.

I have a complete redo of my site ready to go. I would like to install it and then go through a dry run on the actual running site on my server to make sure its ok because one thing I have learned you can write tests till you are blue in the face and test on your local machine as much as you want, there's always going to be something different on the production server.

What is the best way to gracefully take the site down, let visitors know it's down and to come back in a bit, while I can still actually access it and test it out for an hour or so?

I've thought of

-- redirecting all requests to a "site is down" page via htaccess. But then that would redirect me too

-- require a login via htaccess to get into my site. that would confuse people and on top of that I tried this during my site's lil beta run and for some reason once the htaccess authentication was in place, it completely broke rails after you logged in.

-- pointing domain name somewhere else and then accessing my site via my host's name. But where to point it to?

-- upload and test the site in a subdomain. Once I'm sure it's ok, quickly switch it to be the main site. This is probably what I'm going to do.



If anyone's done this before I'd like to hear how. Thanks!

Re: taking site down temporarily while installing new version?

If it was me - i'd create another virtual site in Apache with another ServerName. Get it running on that and when ready, remove the old one and then change over the domain.

No downtime and no reliance on DNS propogation as everything is in your control all the time.

Re: taking site down temporarily while installing new version?

I doubt I have that much control though. I'm running in a shared hosting environment. I will look into that though, that's a good idea.

Re: taking site down temporarily while installing new version?

I went ahead and had the site running in a subdomain for a while. Then it was just a matter of switching a symbolic link to make it the main site. Worked fairly well.