There are a few thing that it helps to be clear on to get this all to work. There are different mechanisms available to have a user's request routed to a specific web site on your DNN and IIS system. Both IIS and DNN have their own mechansims, both work quite well, and they work well together. However, if you are hosting multiple sites and multiple virtual directories it can get confusing.
When a reqest comes to IIS it can be distinguished by the combination of three factors:
- IP address
- Port number
- Host name
The server versions of IIS let you create distinct Web Sites as long as each site is unambiguosly identified by these factors. For example, on Windows Server I can have four distinct web sites:
- IP:10.1.2.3
- IP: all unassigned. Port 80. Host name: MyWebA.com, MyWebB.com
- IP: 10.1.2.4. Port 8080. Hostname: any
- IP all unassigned. Port 80. Hostname: any
Site 1 will respond to all HTTP requests on its IP address (10.1.2.3)
Site 3 will respond to all site requests on its IP address and port number
Site 2 will accept any other requests. However, it will only respond to requests for the site names MyWebA.com and MyWebB.com
Site 4 will be the default bucket and catch any requests the others did not get.
IIS on Windows XP only allows one web site. However, it can have multiple virtual directories. This means that on XP you can't have the combination of IP/Port/Hostname route requests to a specific directory. Any valid combination of IP/Port/Hostname will always get routed to the single Site. On XP you can only route requests to distinct Virtual directories by specifying an Alias or directory name. So, on XP you cannot have www.MySiteA.com go to one virtual directory and www.MyStieB.com go to a different virtual directory (that requires a server version of IIS or some extra software). On XP you can have wwwMySiteA.com go to one Virtual directory and www.MySiteB.com/SiteB go to a different virtual directory because it has a distinct virtual directory alias on the second example.
So, on XP you have to distinguish your virtual directories by directory name. You get one default Root web directory, and then other requests are routed by the first driectory name. When setting up DNN you first need to make sure tht at least one IIS web site will accpet its requests. On XP that means your default web site should probably be like #4 and accept all requests.
Now DNN has its own mechanism for routing requests. Typically, DNN is installed in a single virtual directory (and normally in the default root virtual directory). You set up the DNN virtual directory to accept all requests that match the IP/Port/Hostname combinations you want to support. Typically you want DNN in a web site that is set up for something like IP all unassigned. Port 80. Hostname: any. This will catch any requests.
DNN then looks at the Hostname and port number in the requests to determine which of its Portals gets the request. It looks for an exact match. So, www.MyWebA.com is different from MyWebA.com which is different from MyWebA.com:8080. For every Hostname (and port number) that you want DNN to handle, you must have a properly defined Alias set of for a Portal (under site settings). Also, remember that if you want your Portal to respond by IP Address (http://10.1.2.3/) then you must register the IP address as an alias for the portal. DNN sees the IP address as another hostname.
If a request gets routed by IIS to your DNN install and DNN cannot find a matching Portal alias, DNN uses the default portal for your install which by default is the first portal that you installed. If your requests are being handled by the default portal that means that
1. IIS is routing the requests to your DNN install
2. You probably don't have a Portal with the proper Hostname and Port number set up in DNN so DNN is passing the request to its default portal.
You can set up distinct DNN installs in separate virtual directories or web sites, but you don’t normally do this just to have two portals. If all you want is multiple portals, use a single install and use the DNN portal alias mechanism. Sepearate DNN install and its extra complexity is mostly used for development, testing, or if you just want to keep two sites completely isolated, or if two sites could not share the same web.config (let’s say because one site required a different membership provider than the another, or a user…).