Setting up multiple web sites on Windows XP
So far Vista is not very impressive. But it has one (among very few :) advantage - it comes with IIS 7, which can hold multiple web sites. There is no need to explain, what convenience it provides for web applications development and debugging. For those who works on Windows XP there is a way to emulate (just emulate, folks!) multiple sites on their IIS. You won't be able to run more than one site at once (common, it's not a server!) but still it's pretty handy - you can screw one up with SSL and another with crazy ISAPI filters absolutely independently. So this is what you can do:
Stop the Default Web Server. Navigate to the admin scripts folder (normally c:\inetpub\adminscripts) and run the following command:
adsutil.vbs enum /p w3svc
If you really want to know how the administration scripts work, check here. This particular command will enumerate your default web site as number 1. The script may fail for the first time and offer to register C# scripting or something like that, so just agree on all prompts and run the same command one more time.
Now you can create a copy of your default web site:
adsutil.vbs copy w3svc/1 w3svc/2
And you have yourself a nice second site. IIS MMC most likely will not reflect new site even after refreshing, so just close and reopen it. You can rename the second site the way you want.
Note: always copy from the default site (w3svc/1) and always keep your default web site untouched for a template.
Again - unfortunately, you can not have two sites running simultaneously. You will have to stop before starting another.
No comments:
Post a Comment