Creating Multiple Sites Using Ports
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1
Although not recommended for production servers, you can use nonstandard TCP port numbers to create unique Web site identifiers for site development and testing purposes. You can do this by creating a Web site identity that consists of a TCP/IP address or host header name, appended with a nonstandard TCP port number. Because TCP/IP endpoints are defined by a combination of IP address (or the corresponding name) and port number, configuring a Web site with a nonstandard port number creates a unique endpoint, or identity, for the site.
If you use a nonstandard TCP port number to identify a Web site, users must know the nonstandard TCP port number assigned to the Web site, and append the port number to the Web site's name or IP address in their Web browser address bar.
You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /user:Administrative_AccountName "mmc %systemroot%\system32\inetsrv\iis.msc".
To add a Web site using a unique port identifier using the Web Site Creation Wizard
In IIS Manager, expand the local computer, right-click the Web Sites directory, point to New, and then click Web Site.
In the Web Site Creation Wizard, click Next.
In the Description box, type the name that you have selected for the Web site, and then click Next.
In the Enter the IP address to use for this Web site box, click the IP address used for all sites on this server.
In the TCP port this Web site should use box, type the unique port number reserved for this site.
Optional: In the Host Header for this Web site (Default:None) box, type the host header name to identify the Web site. The host header name must containing the full name of the site, for example, www.microsoft.com.
If SSL encryption is enabled on the server, type the SSL port number, and then click Next. If SSL encryption is not enabled on the server, the SSL port box does not appear.
In the Path box, type or browse to the path of your Web site home directory.
To create a secured or private Web site, clear the Allow anonymous access to this Web site check box, and click Next. (Web sites are configured for anonymous access by default.)
In the Web Site Access Permissions box, set the permissions for the home directory.
Click Next, and then click Finish.
You must be a member of the Administrators group on the local computer to run scripts and executables. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run your script or executable as an administrator. At a command prompt, type runas /profile /user:MyComputer</STRONG>Administrator cmd to open a command window with administrator rights and then type cscript.exe ScriptName (include the script's full path and any known parameters).
To add a Web site using a unique port identifier with the Iisweb.vbs command-line script
If the new Web site will be in a new directory, create the new directory.
From the Start menu, click Run.
In the Open box, type cmd, and then click OK.
At the command prompt, switch to the systemroot\system32 directory.
Type the following at the command prompt and then press ENTER:
cscript iisweb.vbs /create Home Directory
Site Description**" /i** IP Address /b Unique Port
The Iisweb.vbs script supports many more options for creating a Web site. To see the options available, see Creating Web Sites Using Iisweb.vbs.