This is a supplementary note for Module 33. OS used is Windows 2000 Server Standard Edition (can be applied to other 2000 server family), IIS 5.x Windows component installed.
Configuring IIS 5.x
Click Start → Select Programs → Select Administrative Tools → Select Internet Services Manager. The window that follows launched.
Figure 11: Invoking Internet Services Manager.
Click the plus sign in the box at the first level folder to expand the folder.
Figure 12: The IIS window.
Select and right click the Default Web Site sub folder. Select Properties context menu.
Figure 13: Invoking the IIS’s Properties page.
The Default Web Site Properties dialog box launched as shown below.
Figure 14: Web site’s properties page.
In the Web Site tab, change the Description: for your web server such as putting your name or your company. Select the IP Address: for your IP Address (Your web server IP address) and leave the TCP port: to 80 because this is the default port for HTTP protocol. Click the Advanced… button.
Figure 15: Web Site page.
You can edit the setting, change to other IPs (if the host has more than one NIC), and edit the existing setting, set the SSL etc. The host header can be used to differentiate different web sites if you host multiple websites in a single server. In this note we just select the basic settings.
Figure 16: Advance Multiple Web Site Configuration page.
Figure 17: Web Site Identification page.
Click Cancel button until you come back to the first dialog box. Click the Properties button of the Enable Logging (select this tick box). In this page we can set the logging options. We have general and advanced options. The logging properties are quite detail. Notice the log file directory.
Figure 18: Three log file format available for us to choose.
Figure 19: General options of the Logging Properties page.
Figure 20: Advanced options of the Logging Properties page.
Figure 21: The Web server log files ing W3C Extended log file format.
Figure 22: The content of the web server log file open in Notepad.
Click the Home Directory tab. Make sure the physical path of your html files is correct (default path is c:\inetpub\wwwroot). Make sure only Read, Log visits and Index this resource are selected. Leave other setting as is. Then click the OK button. The Execute Permissions: are required if you have script or executable in your web site that needed to be executed. Here we set the Scripts only; at least Java script can be executed. If the Directory browsing is enabled, user can browse your web directory. If the Write is enabled, user can write/upload file to your web directory. So, be careful. You can also see that the content can be located on a shared on other computer (network/domain computer) or can be redirected to other URL (typically useful during the web server maintenance).
Figure 23: Web site’s Home Directory page.
Click the Documents tab. Here we can enable the default document served to web users. The document listed in the box will be used in order. If this option is not enabled, the index.html page will be served automatically if available. From the Figure, Default.htm will be used; if not available the Default.asp will be used and so on.
Figure 24: Web site’s Documents page.
You can add, remove and change the order of the default document. Click the Add button. In the following dialog, you can fill up the default document. Fill in index.html as shown below and then click OK.
Figure 25: Adding an index.html default document.
Then use the upward arrow to move index.html to the first position.
Figure 26 Moving the index.html to the first position.
Click the Apply button. If there are child nodes, the following dialog will prompt you to override the child nodes. Just click the Select All button and click OK.
Figure 27: Inheritance Overrides prompt dialog.
Click the Directory Security tab. Here we can set the web access type, IP/domain restriction (blocking) and secure communication using certificate. Click the Edit button of the Anonymous access and authenticated control.
Figure 28: Web site’s Directory Security page.
Deselect the Integrated Windows authentication option (set by default). Just leave the Anonymous access option selected. For the three Authenticated access options, if either one is set, user will be prompted with login dialog that requires a username and password.
Figure 29 Authentication Methods dialog, anonymous access is a typical selection.
Click the Edit button of the Anonymous access. By default, IUSR_MACHINE_NAME account will be used for anonymous web access.
Figure 30: Anonymous user account used for anonymous web site access.
Click Cancel button until you come back to the Directory Security page. Click the Edit button of the IP address and domain name restrictions. Here you can restrict your web access (blocking). If you click the Add button, you can specify the restriction based on a single computer, a range of IP address or a domain. Just click the Cancel. We select the Granted Access option, means permitting all to access our web site. Click the OK.
Figure 31: Computer, IP address and domain based web site access settings.
Next, click the HTTP headers tab. Here we can enable the content expiration, add custom HTTP headers, rate the content and define additional MIME types/sub types.
Figure 32 Web site’s HTTP Headers page.
Click the Add button of the Custom HTTP Headers. Here, you can add custom header name and value. Click Cancel.
Figure 33: Entering custom header name and value if any.
Click the Edit Ratings button. Based on your web content, you can set the rating of the web site.
Figure 34: Rating your web site.
Click the Ratings tab. Here you can set the rating category, the level of the category and the expiry date. Click Cancel button until you come back to the HTTP Headers page.
Figure 35: Rating category and the level.
Click the File Types button of the MIME Map. Here you can define additional MIME type/sub type. Click Cancel button.
Figure 36: Entering standard and additional MIME type/sub type if any.
Click the Custom Errors tab. Here you can see the standard error pages. You can customize the error pages for example making it localized. Notice the physical location of the error page. When you select one of the HTTP error code line, the Edit Properties and Set to Default button will be enabled.
Figure 37: Web site’s Custom Errors page, viewing/editing the standard and custom HTTP error pages.
Click the Server Extensions tab. The options are available if the FrontPage extension component is installed. It is very useful for the collaboration of the web site development.
Figure 38: Web site’s Server Extensions page.
When you click the Settings button the following Performance dialog displayed. Click Cancel.
Figure 39: Performance settings for Server Extensions.
Click the ISAPI Filters tab. Here you can manage ISAPI filters. You can add/remove/edit ISAPI filters, set the priority, check the status whether the filters is loaded or not.
Figure 40: Web site’s ISAPI Filters page.
Click the Add button. You only need to enter the filter name and the executable file location of the ISAPI filter. Click Cancel.
Figure 41: Entering filter name and their respective executable if any.
Click the Performance tab. Here you can fine tune your web site based on the hits per day, bandwidth throttling and/or process throttling. In real case not just the web site program, we also need to consider hardware performance as well.
Figure 42: Web site’s performance page.
Click the Operators tab. The default web site operator is Administrators group. You can add other user or group as well.
Figure 43: Web site’s Operators page.
Well, we already traverse the Web Properties pages and set the basic options in Web Site, Home Directory, Documents and Directory Security pages. Click the OK button and in order to make sure our settings take effect we need to restart the World Wide Web Publishing service and every time you change the options for any service in IIS, the service must be restarted in order the changes take effect. Next, we are ready to test our web site by running a very simple index.html file as a main page in browser.
Testing A Web Site
Now we are ready to test our web site. Before that we have to create our homepage or the first page of our web site, we will name the first page as index.html, furthermore previously we already set the first default page to index.html. Make sure you log in as Administrator or a member of Administrators group. Go to Windows explorer. Double click Inetpub directory then double click the wwwroot sub directory.
Figure 44: The default physical web pages location, C:\Inetpub\wwwroot.
This is the default location of our main page, index.html. Right click in the folder space and select the New from the context menu. Then select the Text Document.
Figure 45: Creating index.html web page.
Rename the text file to index.html. We will use text editor (Notepad) as our html editor. You can create index.html by using any other HTML Editor such as FrontPage, Dream Weaver etc. Just click the OK button when the warning dialog box appears. Then double click the index.html file. Nothing displayed, because there are no HTML code yet. Click the View menu, select the Source sub menu as follows. Text editor (Notepad) appears.
Figure 46: Viewing and editing index.html using Notepad.
Type the html code as follows.
<title>Put your web site name here</title>
<H1>MY FIRST HOME PAGE</H1><FONT>
<H2>I’M FROM MARS</H2>
<H3>We are setting up our first web site – IIS+HTML</H3></FONT>
Click the File menu, then select Save sub menu. Next, close the text editor. Close all the dialog box and the Internet explorer.
Figure 47: Our index.html HTML code.
Next do the testing. Launch the Internet explorer. In the Address bar, type:
https://Your_IP_Address/index.html or https://localhost/
and press enter. The home page from your web site is loading…
Figure 48: Our web page (and of course web site) in action.
The previous information provides the configuration for a single web site. If you host multiple web sites on single server, you may wan to set the options for all the web sites by doing a single task. You can do this by selecting the Web Sites folder, the root for all the web sites and right click to invoke the context menu as shown below. Choose the Properties menu. The properties page is similar to individual web site.
Figure 49: Invoking the root Web Site directory (global) property page.
When you select the server folder and right click, you will have other context menus as shown below. The useful menus include Backup/Restore Configuration and Restart IIS. So, instead using Services snap-in to restart IIS Admin and other related services that managed through IIS snap-in such as WWW, NNTP, SMTP and FTP services, you can directly do this through IIS snap-in.
Figure 50: Restarting the IIS through the context menu of the IIS.
Instead using Browser such as Internet Explorer, you can browse your web site directly in IIS snap-in as shown below by selecting the Browse menu. Also notice other context menus such as Stop, Pause, Start etc.
Figure 51: Browse web site directly from the IIS.
You can create virtual directory, a directory that used by IIS to map to the physical directory. Virtual directory used mainly in database applications. The server extension context menus are visible if the Server Extensions sub-component is installed.
Figure 52: Creating virtual directory for IIS-physical directory mapping.
Finally the All Task context menu provides several web site management tools.
Figure 53: Other web server management tools that can be accessed through the context menu.
IIS 6.x and 7.x
There are not so much changes in IIS 6.x, most of the settings still similar to IIS 5.x and the latest one is IIS 7.x. As a final word, what is your IIS version?
------------End of Web server, IIS, browser and Internet---------
Further reading and digging:
MSDN MFC 9.0 class library online documentation - latest version.
DCOM at MSDN.
COM+ at MSDN.
COM at MSDN.