Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

app_offline alternative

I usually place an app_offline.htm in my root directory when I am releasing a website to a production environment. However sometimes if there has been a few big changes to the site, I would like to click around first to make sure it's stable without allowing access to anyone other than me.

As far as I am aware this isn't possible, but I'm hoping someone has a neat solution...

The solution has to include if someone has a deeplink into the site, so using a default.htm/asp page in the root won't do the trick unfortunately.

like image 485
Jamie Carruthers Avatar asked Mar 29 '11 18:03

Jamie Carruthers


2 Answers

I agree with the staging environment answer above, but otherwise here's one possible approach: Temporarily block all IP addresses besides your own. This can be achieved through IIS Directory Security configuration, or programmatically in any number of ways

You can redirect all the non-authorized users to an Under Construction page of some sort. Meanwhile, you can happily browse the site from your IP. When the site is vetted, you remove that IP restriction and the site becomes available to the world at large.

like image 62
LesterDove Avatar answered Oct 17 '22 05:10

LesterDove


It's a difficult thing to achieve. That's why you should have a staging environment where everything should be validated before shipping into production. Then during the deployment process (if it takes long, but it shouldn't) you could use an App_Offline file. This staging environment should be as close as possible to your production environment (in terms of software, patches and configurations installed, not in terms of hardware power of course).

like image 34
Darin Dimitrov Avatar answered Oct 17 '22 04:10

Darin Dimitrov