views:

1236

answers:

4

I'm running WinXP Pro SP3 and IIS 5.1 on my home dev machine. As far as I can tell IIS 5.1 only allows me to host one website, which is a problem because I'm working on three at the moment. Is that right, and, if so, is there any way around that limitation?

EDIT: This is just for dev/test purposes - I don't want to actually host any live websites, or even let anybody apart from me access them.

+1  A: 

You can host different site apps in different virtual directories, like:

http://localhost/Site1

http://localhost/Site2

http://localhost/Site3

But I don't think you can have XP IIS respond for different hosts:

http://Site1/

http://Site2/

http://Site3/

slolife
+2  A: 

You can only host one website on XP. You will also find that there are connection limits, so that even hosting one website can be a challenge.

One way to simulate more than one site is to have a separate host name for each site. Then create each "site" under its own folder, e.g.,

/site1/

/site2/

/site3/

and then code common to each site (e.g., in your layout) checks the URL and redirects to a page under the appropriate folder if it is not already loading a page from there. So you effectively tie a hostname to a subfolder.

RedFilter
+4  A: 

If this is for testing, you might be able to get by with IIS Admin, which lets you set up multiple sites, but with only one active at a time:

http://blog.crowe.co.nz/archive/2005/08/08/179.aspx

Michael Burr
Yep that's what I used to do way back when.
Kev
Thanks for the info. Looks like a useful utility but I've gone with Jim's solution for now.
gkrogers
This may be a later version of IISAdmin http://www.codeplex.com/iisadmin
Jimmy
+5  A: 

This is actually possible to do without any kind of addon. XP Pro will still allow multiple sites to run under IIS, but they have removed the option to configure this from the GUI. They have also removed the ability to have more than one site run simultaneously. Using the scripts found in the \Inetpub\Adminscripts directory you can add additional sites, and then use the IIS admin snapin to toggle which one runs.

This article explains the details:

http://www.developerfusion.com/code/4645/multiple-iis-virtual-servers-on-xp-pro/

Jim Petkus
Great link - works like a charm - cheers!
gkrogers