tags:

views:

75

answers:

2

ScottGu says "One nice feature of IIS7 on Windows Vista is that you can now have an unlimited number of sites on a box" in his post: http://weblogs.asp.net/scottgu/archive/2007/04/06/tip-trick-enabling-ssl-on-iis7-using-self-signed-certificates.aspx

Does that mean I can run my site on:

http://localhost/

And have more than 1 site like that? I have to use different port #'s though right?

+2  A: 

You can use either different ports or different host headers. You could point www.mysite.com to 127.0.0.1 and have a site listening for that host header, and another site listening for www.mysite2.com etc. Here's how to setup multiple sites based on host headers.

IIS7 has been tested on 100,000+ sites, so....it'll handle more than you need.

Nick Craver
Don't muck around with port numbers unless you have to, just use the host headers if you can. If you're local to a network that you don't have DNS control over then you'll probably have to go the port route, though.
Chris Haas
@chris if you don't have dns control you can always add an entry into the HOSTS file to make it a little easier
Brian Surowiec
@Brian -Not sure if that counts as *easier* :)
Nick Craver
@Brian: nice one, thats what I do most of the times, but you do need admin rights on the machine (I believe)
ram
A: 

Ports or host headers both work. Ports are probably easier if you are sharing the URL with many people. That way they only need a bookmark and they don't all have to edit their hosts file. Host headers are nice because it is less to type if you aren't using bookmarks.

This is not new to IIS7, every version of IIS I have ever worked with could host multiple sites. IIS 6 is no slouch in hosting many sites. I have tested IIS6 with 4000 sites configured with host headers, vs a custom ISAPI dll that only needed to modify one string to alter the root of the site. The speed differences were minimal.

ScottS
He's talking about this being new to Vista. Previously the desktop versions of IIS were limited to a single site.
Chris Haas