Microsoft

Create multiple Web sites with Windows 2000 Professional

There is no mechanism in the IIS console under Windows 2000 Professional to create multiple Web sites, but there is a way to get around that restriction and create multiple sites if you have access to a Windows 2000 Server computer. Here's how.

You can use Internet Information Services (IIS) on a Windows 2000 Professional computer to host a single Web site and a single FTP site. When you install IIS, Setup automatically creates the default Web site, which you can use to publish documents to other users on the LAN/intranet or Internet. You can also use the default Web site to support printing across the Internet through the Internet Printing Protocol (IPP).

There is no mechanism in the IIS console under Windows 2000 Professional to create additional Web sites, since you can only run one at a time. However, here's a way to get around that restriction and create multiple sites if you have access to a Windows 2000 Server computer.

  1. Copy the folders and files under \%systemroot%\SYSTEM32\INETSRV\IISADMIN to the same folder on your Pro computer.
  2. Browse to http://localhost/iisadmin/default.htm.

You now have the ability to create additional sites. Only one site can be running at a time, however, so you'll have to stop the current site to start another. You might find this capability useful if you're developing several sites and want to test them on your local computer before taking them live.

Miss a Windows 2000 Professional tip?

Check out the Windows 2000 Professional archive, and catch up on previous Windows 2000 Professional tips.

Want more Windows 2000 Professional tips and tricks? Automatically sign up for our free Windows 2000 Professional newsletter, delivered each Tuesday!

4 comments
cdagil
cdagil

You can use Xampp for Windows and have a good server with all the virtual websites you want, besides MySQL and PHP. And it's free. :) Greetings

tlbenac
tlbenac

In the server versions of Windows, you can have multiple versions of web sites installed into IIS and running simultaneously. You can install and run more than one web site within IIS in the professional version of Windows XP or Windows 2000. You just have to pull a trick to modify the IIS metabase to that it is aware of the additional sites. The user interface does not support creating more than one web site. Also, you still will not be able to have more than one site running at the same time. Creating a Web Site in IIS To create the second web site: ....Create a command prompt window. ....Type "cd \Inetpub\Adminscripts" and press Enter. ....Find out what the highest numbered site you currently have is. You can do that by typing CSCRIPT.EXE adsutil.vbs ENUM /P W3SVC If you have never done this process before, the highest numbered site should be 1. Add one to the highest numbered site. Then run this command: CSCRIPT.EXE adsutil.vbs COPY W3SVC/1 W3SVC/x Where x is replaced by the new numbered site. For example, if you run the enum command and the highest numbered site is 4, then type this: CSCRIPT.EXE adsutil.vbs COPY W3SVC/1 W3SVC/5 We will assume for this example that this will be the second site so substitute 2 for the x. Run the IIS Manager. You should find a new site has been created. It will be an exact copy of site #1, so you will need to change a few things. Go into the properties for the web site. Change the site name, and the virtual directory for the root of the web site to point to another location on the hard disk. Usually, you will create a new subdirectory under Inetpub and point the virtual directory at that. To use the site, you must first stop the currently running site, then start the new site. Deleting the Web Site Created in IIS To delete a site, first stop it if it is running (bad things happen if you don't!). Then type: CSCRIPT.EXE adsutil.vbs DELETE W3SVC/x Where x is the number of the site you want to delete. Finding Web Site Number You can find the number for an existing web site in IIS Manager by enabling logging and examining the logging properties. The web site number is at the bottom of the dialog. NOTE: You may or may not need the CSCRIPT.EXE in front of the adsutil.vbs, I did.

spencer.doro
spencer.doro

You can also create virtual directories within IIS, and store each individual site in its own folder. When you browse to your website, http://localhost for example, you just append the directory for the site at the end of the url, such as localhost/folder. Granted, this is still only one website, I use this method to test individual sites on one IIS installation. When you browse to the folder, the borwser loads the index file it finds, if available, just like a browser does when you send to any site. It works great for me.

RFaircloth
RFaircloth

Will this work the same way with XP Pro & Win 2003 Server? Thanks! Rick

Editor's Picks