I find I need to use host headers for SharePoint sites a lot. For example, in a recent deployment I had the following host header sites all pointing via DNS entries to the same farm/web front end (it was a small farm):
- ssp.foo.com
- mossca.foo.com
- intranet.foo.com
I’m doing this on Windows Server 2008, IIS 7, with the latest service packs and updates (as of this writing). There is a know issue/feature where you will be unable to browse the sites defined by host headers from the web browser on the web front end. This gives the distinct feeling that your SharePoint site is broken, when in fact it’s just fine.
In particular, for a development environment, you generally don’t have the option of off-server web browsing, so this becomes a big issue. There is a KB article here http://support.microsoft.com/kb/896861 that describes what to do to fix the issue – yes, the article only says IIS 5 or 6, but this does work for IIS 7 too.
Anyway, I decided to write a PowerShell script that makes making or checking these registry edits trivial.
You can find it here: http://blumenthalit.net/Files/PowerShell%20Scripts/kb896861.ps1.txt
At some point, I should add this to CodePlex.com/psbb, but not tonight.
--Michael