Creating Multiple Sites Using Multiple IP Addresses
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1
Some server configurations require the use of unique IP addresses to distinguish multiple Web sites on the same server.
IIS enables you to configure Web sites to listen on all available IP addresses, or on an individual IP address. If you use multiple IP addresses to distinguish between different sites on the same server, you must configure IIS to assign each site a unique IP address.
Important
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".
Procedures
To add a Web site using a unique IP address 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.
Click Next.
In the Description box, type the name you have selected for the Web site, and click Next.
In the Enter the IP address to use for this Web site box, click the unique IP address reserved for this site.
In the TCP port this Web site should use box, type the port number used by all sites on the server. This should typically be left at the default of 80.
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 then 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.
Important
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 IP address 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** Unique IP Address /b Port
Note
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.
Related Information
For detailed information about the different methods of hosting multiple Web sites on a single server, see Hosting Multiple Web Sites on a Single Server.
For information about Web site names, see Domain Name Resolution.