Configuring Multliple Sites On IIS 7
Posted By : todd sharp Posted At : May 12, 2007 9:37 AM Posted In: IIS
5
If you're playing along at home since my my last post you should now have the latest and greatest version of ColdFusion installed successfully on IIS.
So now what? Well now we take advantage of the fact that we can create multiple sites under one root. As a refresher here is the example I mentioned in the last post:
- wwwroot
- site1
- components
- myComponent.cfc
- components
- site2
- components
- myComponent.cfc
- components
- site1
<cfset obj = createObject("component", "site1.components.myComponent")>
Which gives us a major headache when we move site1 to production and it's now lying in the root. What would really be cool is if we could have both site1 and site2 set up as seperate sites on the server so that we could call:
<cfset obj = createObject("component","components.myComponent")>
from either site1 or site2 and have both work as expected.
That's where IIS comes in. As previously mentioned I like GUIs. The GUI management console for IIS7 is pretty slick looking. Here's a screenshot of the main console:



Can you also do this (adding multiple sites) for IIS 5.1 on Win XP Pro?
I set it to "mysitetest" and also added the entry for mysitetest aliased to the localhost IP (127.0.0.1) and flushed the dns (ipconfig /flushdns) but when I try http://mysitetest/ on the browser rather than getting my site I get the IIS7 splash screen instead.
If I remove the "hostname" (host header in your figure) and leave it blank then I can access my site using the IP address (http://192.168.0.65/).
HTTP Error 404.3 - Not Found
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.