HOW TO: Set Default Documents in a UNIX-to-Windows Migration (324044)



The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional
  • Microsoft Small Business Server 2000
  • Microsoft Internet Information Services 5.0

This article was previously published under Q324044

SUMMARY

This article describes how to set the default documents that are served from a folder or for all of the site when only a folder is requested by the client computer. This article compares the Internet Information Services (IIS) method for this process to the Apache method.

back to the top

Set Web Site's Default Documents

If you use Apache, you can control the document that is served to a client if a specific document in a folder is not requested. To do so, you can use the DirectoryIndex directive, for example:

DirectoryIndex index.cgi index.shtml index.html

The order in which the documents are listed is important because the order determines the priority. In this example, if both the Index.cgi document and Index.shtml document exist in a folder, Index.cgi is run and returned to the client.

If you use IIS, you can get the same result by modifying the Documents setting for a folder. To set the default documents and the priority in IIS for all of the Web site:
  1. Log on to the Web server computer as an administrator.
  2. Click Start, point to Settings, and then click Control Panel.
  3. Double-click Administrative Tools, and then double click Internet Services Manager.
  4. Right-click the Web site in the list of different served sites in the left pane, and then click Properties.
  5. Click the Documents tab.
  6. Click to select the Enable Default Documents check box.
  7. Click Add to add the name of a file or script to be used as a default document.
  8. Use the arrow buttons to change the priority of the listed files. The files at the top of this list are selected first (if they exist).
NOTE: The changes you make are applied immediately; you do not have to restart IIS.

If you use Apache and you want the default document list to include a script, you must have already created an association between the file name extension and the program or library that is used to parse and evaluate the document.

back to the top

Set Default Documents for Individual Folder

If you use Apache, you can set a different default document list for a specific folder by using the DirectoryIndex directive within a Directory directive or an .Htaccess file. If you use IIS, you can also configure the default document for a specific folder. To set a specific folder with a default folder specification:
  1. Log on to the Web server computer as an administrator.
  2. Click Start, point to Settings, and then click Control Panel.
  3. Double-click Administrative Tools, and then double click Internet Services Manager.
  4. Select the Web site from the list of different served sites in the left pane.
  5. Right-click the folder within the Web site that you want to modify, and then click aProperties.
  6. Click the Documents tab.
  7. Click to select the Enable Default Documents check box.
  8. Click Add to add the name of a file or script to be used as a default document.
  9. Use the arrow buttons on the left to change the priority of the listed files. The files at the top of the list are selected first (if they exist).
back to the top

REFERENCES

For additional information about configuring basic settings for a migration from UNIX to Windows, click the article number below to view the article in the Microsoft Knowledge Base:

324213 HOW TO: Migrate Apache Settings and Configure IIS in a UNIX-to-Windows Migration

back to the top







Modification Type:MajorLast Reviewed:6/28/2004
Keywords:kbhowto kbHOWTOmaster KB324044 kbAudITPro