Although the default settings for PWS allow you to quickly and safely publish documents on your Web site, you may have special needs that require changing some of the defaults. For instance, the default setting is to have a home page that displays links to other documents on your site. However, if you have a large number of documents to share, and the documents are to remain in their native formats, you may find that directory browsing is a faster and more efficient way for users to reach your documents.
This topic defines and discusses the following settings:
The Role of Default Documents
A default document is the document, usually in HTML format, that the server presents to site visitors when visitors have not specified a file name in their request. If you type http://www.microsoft.com/ in the address field of your browser, you reach the Microsoft home page, even though you didn’t type a file name. That is because the Web server responds with a default document (the Microsoft home page) for all requests that do not include a file name.
What happens if visitors add a subdirectory under the home directory to their request, but still fail to add a file name? If you type http://www.microsoft.com/iis/ in your browser, you reach the default page specified for the Internet Information Server subdirectory of the Microsoft home directory. By placing a default page in every publishing directory, you can assure that visitors find a home page on your site, regardless of the path they type to get there.
PWS supports the use of multiple default document names. When a request without a file name arrives, PWS searches for the first default document name. If it does not find a document with the first name in the directory specified in the request, it checks for the second default document name, and so on until it finds a file or runs out of names. This means you can have a default document with one file name in one place in your directory structure, and another default document with a different file name in another place in your directory structure. Alternately, you can use the same file name in each directory, but make the content different depending on the directory the file resides in.
The default document can have any name you want, provided it is a file name supported by the operating system. Names must be composed of letters and numbers, but cannot contain spaces. The most common names are Default.htm and Index.htm. You can also have different file name extensions, the three letters following the period in the file name. For instance, if you have a Microsoft® Active Server Pages script in your home page, you should use the .asp extension, so the server correctly processes the script. In this case, your home page might be called Default.asp, or Index.asp. To change the name of the default document used by PWS, see Changing the Default Home Page Name.
If you choose not to use a default document, visitors can still reach your site by typing the file name they are requesting at the end of your site address. To do this, the visitor must know the exact file name in advance. The other way visitors can navigate around your Web site is to use directory browsing.
Navigating by Using Directory Browsing
Directory browsing is an easy alternative way of navigating to documents on a Web site. If you disable the automatic use of default documents, and enable directory browsing, visitors view a list of all files in the the directory specified in their request. PWS automatically generates and formats the list displayed. On sites with many documents in non-HTML formats, or sites where documents are constantly being added or removed, this is a fast, low-maintenance way of presenting the documents in the directory for visitor access. When a visitor clicks on the file name, the content of the document is displayed (assuming the visitor has a program compatible with the file format of the document.) For information on how to enable directory browsing, see Enabling Directory Browsing.
Activity Logs and Security
The simplest form of Web site security is to maintain a log of the computers that contact your site. The log records who visited your site, when they visited, and what they looked at. By checking your logs, you can find out how people are using your site, and make sure that no one is misusing it.
Logs are written in the NCSA log file format and can be viewed in any text editor. New files are created monthly and placed in the Log File/W3SPC1 directory of your Windows System folder. The file names begin with Nc and are followed by the year, month, and day as numbers. For example, a log file made in August of 1997 would be named Nc9708.log. For instructions on enabling logging, see Logging Site Activity.
Web Site Performance
The amount and kind of activity on your site can affect both the performance of your site, and also of other applications running on your computer. To help you monitor performance and find potential bottlenecks and problems, PWS includes a site monitoring graph. The graph includes a number of different ways of viewing site statistics. For more information on the performance measures available, see Viewing Site Performance.
Web site performance can be affected by a number of different factors. These include:
- The bandwidth size of your network connection.
- The size of files on your site.
- Resources needed by applications and scripts embedded in or launched from your pages.
- The amount of RAM and the processor speed of your computer.
Most browsers do not make a single connection to your site. Many browsers are capable of maintaining four simultaneous connections. PWS has a 10-connection limit. This means that your site can comfortably support two or three users simultaneously.
If you have a slow network connection, files take longer to reach your visitor. Each graphic in an HTML page is a separate file and each requires its own connection to be transferred to the browser. If your files are large, or your HTML pages contain a large number of graphics, the visitor must wait for your page to load. Keep graphics to a minimum and make them relatively small to make transfer of your pages more efficient, and you are less likely to lose visitors because they got tired of waiting.
© 1997 by Microsoft Corporation. All rights reserved.