IIS in XP

Before you start

Objectives: learn how to install IIS and how to create sites inside of IIS.

Prerequisites: no prerequisites.

Key terms: folder, iis, web, default, directory, service, file, website, wwwroot, install, manage, content, interpub


About IIS

We can share our folders using the IIS so that others can access our folders via Internet Explorer. As we go to the folder properties, we’ll notice that there is a Web Sharing tab (IIS has to be installed). When we install IIS, it is going to create several directories for us. On the C drive we will have the directory named ‘inetpub\wwwroot’. This is going to be our default directory for all of our shares. If we want to create a web share, all we have to do is create a sub-directory in ‘wwwroot’. Let’s say that we want to create ‘Public’ share. The path to our share would look like this: ‘c:\inetpub\wwwroot\public’. All we have to do now is add some data to the ‘Public’ folder. To access those, we have to type in ‘http://’, and then the name of our computer. Users will be redirected to our ‘wwwroot’ folder. This way we will see all web shares on that particular computer. To access a share directly, we have to type in the share name. For example, to access a Public share on a ‘Verson’ computer, we have to type in ‘http://verson/public’ in Internet Explorer or some other browser. We can also create shortcuts to directories on our computer, so that we don’t have to put all our data in ‘\inetpub\wwwroot\’. If we go to the properties of some folder and create a web share on the Web Share tab, the system will create a shortcut to that folder in the ‘wwwroot’ directory. That way, users can access those files without copying them to the ‘wwwroot’ folder.

Installing IIS

We can use Add/Remove Programs to install IIS on Windows XP Professional computer. Let’s go to the Control Panel, open Add or Remove Programs, and select Add/Remove Windows Components from the left menu. Scroll down a bit, and select Internet Information Services (IIS).

 IIS Selected

Image 251.1 – Windows Components Wizard

Let’s click on the Details button. Notice that when we install IIS, the World Wide Web service is installed. This is the web or http service. Also notice that the FTP service is not installed by default. We will select it because we do want to install FTP on this machine.

FTP Service

Image 251.2 – FTP Service Selected

Let’s take a look at the details of the World Wide Web service. We will select it, and click Details.

 Remote Desktop Web

Image 251.3 – WWW Details

‘Printer virtual directory’ and ‘World Wide Web Service’ are installed. We will also select Remote Desktop Web Connection. Click OK. Notice that the Internet Information Services Snap-in is installed by default. Now that we have selected items that we want to install, we will click OK, and then click Next to start installation.

 Installation

Image 251.4 – Windows Installation Disk is Required

It will ask us to put the Windows CD in our CD drive. After that the installation continues. After the installation click Finish. Now, let’s open the IIS Management tool which is located in Administrative Tools. In IIS Management we will open local computer, then Web Sites, and then select Default Web Site.

Default Web Site

Image 251.5 – IIS Management Console

Let’s take a look at that Default Web Site. Let’s open Internet Explorer. We can either type in the IP address of this computer, or we can use a localhost as the URL to take a look at the website hosted on this machine.

 Default Web Site Opened

Image 251.6 – Default Web Site Opened

Web Site Content

When we install IIS, default website is configured and started. Default website contains several directories and files that are used to represent that site. Let’s check the contents of the Default Web Site.

 Content

Image 251.7 – Site Content

As we can see there are number of folders and files used to setup that site. The default website files are located on the system partition in the \inetpub\wwwroot\ folder. We can right-click the website and select Open to open in Windows Explorer.

 Folder Content

Image 251.8 – Folder Content

One way to manage website content is to add folders and files to the wwwroot directory. Let’s create new folder called ‘Manuals’ and folder called ‘Databases’.

 New Folders

Image 251.9 – New Folders

We will also add some simple html file to the Manuals folder.

 Manuals Folder

Image 251.10 – Manuals Folder

Now let’s go back to the IIS snap in, and refresh the website.

 IIS Snap In

Image 251.11 – IIS Console

Now we can see our two new folders that we have created with Windows Explorer. We can also see our ‘index.htm’ file in Manuals folder.

 Manuals Folder

Image 251.12 – Manuals Folder Content

We can also make directories outside of this directory structure by creating Virtual Directories. Virtual directories are like shortcuts in IIS that point to directories in other locations. To create a Virtual Directory in IIS, right-click a website, point to New, and then select Virtual Directory.

 Virtual Directory

Image 251.13 – New Virtual Directory

Click Next to continue. We need to type in the Alias for our Virtual Directory. Let’s call it Manuals.

 Virtual Directory Wizard

Image 251.14 – Wizard

Click Next to continue. We need to type in the Alias for our Virtual Directory. Let’s call it Manuals.

Alias

Image 251.15 – Alias

Click Next. Now we need to enter the path to our directory. In our example the path will be ‘E:\Paulaner’.

 Path

Image 251.16 – Path

Click Next. Now we need to select permissions. We will accept the default permissions.

 Permissions

Image 251.17 – Permissions

Click Finish. We can see Paulaner in IIS.

 Paulaner In IIS

Image 251.18 – Paulaner in IIS

We can also use Windows Explorer to make Web Shares. Let’s go to E drive, open properties for Databases folder, and go to the Web Sharing tab.

 Web Sharing

Image 251.19 – Web Sharing Tab

Here we will select ‘Share this folder’. When we do that, the following window appears.

 Edit Web Share

Image 251.20 – Edit Web Share

We will accept default settings and click OK. Click OK again. Now let’s go back to the IIS console and refresh the content of the default website.

 Databases

Image 251.21 – Databases Folder

Databases folder is now visible. Now we can access it by typing http://localhost/databases in Internet Explorer.

Remember

When we install IIS, the World Wide Web service is installed. FTP service is not installed by default. IIS Management tool which is located in Administrative Tools. When we install IIS, default website is configured and started. Virtual directories are shortcuts in IIS that point to directories in other locations.

Paths that are mentioned in this article
  • c:\inetpub\wwwroot\ – default location for IIS sites
  • E:\Paulaner – folder on E partition which we used to create Virtual Directory
  • http://localhost/databases – URL to the local site