views:

974

answers:

3

I have a very fast web server (IIS6, ASP.NET) that I want to use for several sites. Now, I already have a domain that maps directly to the IP address of the server, but how can I get another domain to map to a subfolder (i.e., a separate ASP.NET application) on that same computer? Is it theoretically possible? (note: only port 80 is open, I cannot open other ones.)

Accepted answer: shown below. I actually followed the tutorial and got it working. Hooray! Thanks, everyone! :)

+3  A: 

Sure, you could do it with domain host headers. Just create a new web site and chose a different host header (e.g. www.example.com) and let it point to the desired folder. You can create hundreds of web sites on a single server, if you like.

Here is a tutorial how to do this.

  1. Open IIS Manager
  2. On the left side, expand your computer name, then click "Web Sites", right click in the right side, put your mouse over "New" and select "Web Site..."
  3. Click Next in the dialog, then put in a description of the new web site you are creating (can be anything)
  4. Click Next again and go to the last text box and put in what you want the new Host Header to be
  5. Now put in the path to your new site and make sure you keep "Allow anonymous access" checked
  6. Check "Run scripts" (for ASP.NET execution) if it's not already checked.
  7. Click Finish on the next dialog and you're done!
splattne
A: 

Just create a new site in your "IIS Manager" application - the wizard will ask for the DNS hostname of the new site.

To see (or change) that value later, on the "Web Site" tab of the properties pages for that site, use the "Advanced..." options to chose which values for the HTTP/1.1 "Host:" header are used to get to that particular site.

Alnitak
A: 

Does it have to be a subfolder? You can setup a different site in iis and use host headers to direct each domain to the relevant site, all using one ip.

You can't do this if you need ssl though; you really need multiple ips for that.

If it has to be a subdir you can create another site as above and set it to redirect to somewhere else.

Steven Robbins