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://localhos开发者_StackOverflow中文版t/
And have more than 1 site like that? I have to use different port #'s though right?
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.
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.
精彩评论