Creating Websites on Windows 2003 Server
Prerequisite
IIS services must be installed prior to creating websites. For details refer to article "Installation of IIS Service on Windows 2003 Server".
Default Website
The installation wizard of "Internet Information Services" by default installs a default website within your operating system partition with the physical folder name as "wwwroot".

The default webshare name of this default website is "/", for confirming that just right click on the "wwwroot" folder -- click "Properties" -- click "Web Sharing" tab.
As it is shown in the above image, the alias or web share name is "/". So if the web server name is "machine" and if you want to access a page located physically at "c:\inetpub\wwwroot\a.html", then you have to type the following URL as given below:
As it is clear from the above image, the url can be broken down into three parts for more clarity.
- http:// [the protocol used to access the website]
- machine [the host server name / an ip address can also be used]
- / [the web share name to access the physical website folder "c:\inetpub\wwwroot"]
- a.html [the webpage currently present inside the "wwwroot" folder]
View default website properties via IIS Manager
In order to view or edit specific website properties, open "Internet Information Services (IIS) Manager" by clicking "Start" -- "Control Panel" -- "Administrative Tools" -- "Internet Information Services (IIS) Manager".

As it is clear from the above image, our default website is already registered in the IIS Manager. Now to view the properties of the default website, right click on the "Default Web Site" node given on left hand side tree and then click "Properties". The following dialog box would appear.
As you can see, the default active tab is "Web Site". If you look at the "TCP port" value, which is "80", means that the "Default Web Site i.e. wwwroot folder" is accessed at port 80 of the web server. Hence in order to access c:\inetpub\wwwroot\a.html page, the following two urls are same.
- http://machine/a.html
- http://machine:80/a.html
If you use the second url, it would be automatically replaced by the first url. The reason is that, when you are not using the port number for accessing a website, the port number defaults to 80. Hence our "Default Web Site" is accessible at port 80.
Now click on the "Home Directory" tab as show below:
From the above figure, it is confirmed that our "Default Web Site" root is "c:\inetpub\wwwroot" given under the label heading of "Local path".
Creating Sub-Folders in Website Root
There are two ways of creating sub-folder in a website.
- a sub-folder created physically within the root folder i.e. c:\inetpub\wwwroot
- a virtual folder created else where in the hard disk, but registered as sub-folder of the "Default Web Site".
The above two methodologies have their own merits and demerits, which are discussed in "Difference between website's sub-folder or its virtual folder". Currently for our understanding, we will create two folders as given below, along with their content html files.
A normal sub-folder with the name "examplea" created physically with in the "wwwroot" folder is as follows:
The above "c:\inetpub\wwwroot\examplea\show.html" would then be accessed via browser as:

Creating virtual folder with the name "exampleb" in order to be registered under "Default Web Site"
- Create a folder with the path "c:\exampleb" as shown below

- Right click on the folder and click "Properties".
- In the properties dialog box, click "Web Sharing" tab as shown below.

- In the image above select "Default Web Site" for sharing / registering as virtual folder and "Share this folder" radio button. As soon as you select the radio button the following dialog box would appear.

- Keep the default settings and click "OK" button.
- After that click "OK" on the "exampleb" folder properties dialog box.
- Now open the " Internet Information Services (IIS) Manager" control panel from the "Administrative Tools".
- Our virtual folder "exampleb" is present as part of the "Default Web Site" as shown in the diagram below.

- Right click on the "exampleb" virtual folder and click "Properties" and follow the next sub heading.
Setting up the Virtual Folder / WebSite
Whenever we create a new virtual folder within an existing website like our above scenario i.e. "exampleb" virtual folder registered with in "Default Web Site" or create a new website, the following necessary steps should be followed in order to configure the website or virtual folder for the desired purpose.
- From the "Internet Information Services (IIS) Manager", open the properites dialog box of "exampleb" virtual folder and click on the "Directory Security" tab as shown below:

- Click "Edit" button of "Authentication and Access Control" group.

- With in the "Authentication Methods" dialog box only select "Enable Anonymous access" checkbox, do not change the default userid and password and then click "OK" button.
- After that click "ASP.NET" tab and then select the desired "ASP.NET" version as shown below.

- After that click "Documents" tab. Enable the "Enable default content page" check box. Remove all the irrelevant file names and add your desired file, which you want to show as default page, when you virtual folder / website is going to be accessed. In our case, it is display.html

Finally click "Apply" and click "OK". Since our "display.html" page is set as default for our "exampleb" virtual folder present physically at "c:\exampleb\display.html", so the "display.html" page can be accessed as:

or
Creating New Web Site
Since our "Default Web Site" is hosted at port 80, so for our new website we have to pick a different port number. For creating and configuring a new web site, follow as:
- Open the "Internet Information Services (IIS) Manager" and right click on "WebSites" node -- "New" -- "Website" as shown below.

- Click "Next" in the "Website Creation Wizard" dialog box and type the description of the website along with the suggested port number as shown below. (The port number is not necessary to write here but its just for better management)

- Click Next, and then assign the port number 8090 as given in the following figure.

- Click Next, and then select a physical path for our new website, by clicking the browse button. (Before this step by using "Window Explorer" create a new folder as "c:\MyNewWebSite")

- Click Next, in the following dialog box only maintain the "Read" access and then click Next.

By following the above steps, our new website is setup. Furthermore usually it is required to allow the webpages to create, update or delete files within the website or the virtual folder. Hence whether it is a website or a virtual folder, we have to give Full NTFS persmissions (if your partition is NTFS formatted) to the following users / groups.
- IIS_WPG
- IUSR_MACHINE (Since current server name is "Machine")
- ASPNET
For applying the persmissions, follow as:
- Using "Window Explorer", right click on "MyNewWebSite" -- click "Properties" -- click "Security" tab as shown below:

- For adding the above user / group click "Add".

- By clicking on "Location" button ensure that your server name (in our case is "Machine") is selected in the above image.
- Just type "IIS_WPG" in the textbox and click "Check Names" button for the confirmation from the server and then click "OK" button.

- As it is clear from the above image, select "Full Control" for the selected group i.e. "IIS_WPG". After this do not click "OK", but just add the other two user accounts with same privileges and then click "OK".
Now our new website is configured properly for hosting / operations. Just create your webpages with the "c:\MyNewWebSite" folder as shown below:
The page "first.html" would then be accessed via browser as:

The above url can be broken down as:
- http:// [protocol with which the website is accessed]
- machine [server name / or IP address can be used]
- :8090 [the port at which our website is active]
- / [means c:\MyNewWebSite folder]
- first.html [the page with in c:\MyNewWebSite folder]
For any feedback or suggestion please contact at: customersupport@firstclass-writeups.org, your valuable suggestion would be highly appreciated.
Above tutorial is the property of firstclass-writeups.org