Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top