tags:

views:

288

answers:

2

I have an IIS server with 4 sites configured, using host headers and sharing the same IP. During a server move, I want to turn off the sites and display a holding page.

To do this I intend to create a 5th site with no host headers configured (ie a catch-all), a 404 handler with maintenance notice, and during the upgrade, stop the other 4 individual sites.

Question: When I stop the 4 individual sites, will this also turn off the host-header catchment so that all traffic is sent to the 5th site (maintenance page).

Unfortunately I currently only have access to an XP machine with IIS 5 to experiment with. I checked the MSDN articles, but they do not seem to mention what happens when individual websites are stopped.

+1  A: 

Yes, when you stop a site on address $IP with a specified host header, its requests will pass through to a site with just address $IP. Your migration method will work just fine.

Example:

  1. Site on 192.168.1.1, host header SpecialSite.local
  2. Site on 192.168.1.1, no host header

As long as site #1 is running, requests for SpecialSite.local will hit it. Once site #1 is stopped, the requests will pass through to the "default" site for that IP, #2.

boflynn
+1  A: 

If it's only 4 sites (and I assume 4 domain names bound to those sites), why not just remove the headers from the source site, add them to the target site then reverse once the move is complete? No ambiguity about how IIS would handle that scenario!

Troy Hunt
Thanks - I considered that and it would definitely work. I actually have to implement this on several load balanced servers (I know I didn't add that to the post - didnt want to distract from the question). The idea is to make the change over as seamless as possible, by setting up the catch-all maintenance site first and then stopping the others on each server.
Neil Fenwick