You use the Document Preferences page to set document preferences. This section discusses these topics:
Entering an Index Filename
If a document name is not specified in the URL the server automatically displays the index file. The default index files are index.html and home.html. If more than one index file is specified, the server looks in the order in which the names appear in this field until one is found. For example, if your index filenames are index.html and home.html, the server looks for index.html and if it doesn't find it looks for home.html.
To enter an index filename, edit the Index Filenames field in The Document Preferences Page of the Server Manager.
Selecting Directory Indexing
In your document directory, you'll probably have several subdirectories. For example, you might create a directory called products, another called people, and so on. It's often helpful to let clients access an overview (or index) of these directories.
The server indexes directories by searching the directory for an index file called index.html or home.html, which is a file you create and maintain as an overview of the directory's contents. (Note that these defaults are configurable for the whole server, so your server's files may vary. For more information, see the previous section, Entering an Index Filename). You can specify any file as an index file for a directory by naming it one of these default names, which means you can also use a CGI program as an index if CGI is activated.
If an index file isn't found, the server generates an index file that lists all the files in the document root.
To select directory indexing, use The Document Preferences Page in the Server Manager.
Warning.
If your server is outside the firewall, turn off directory indexing as well as web publishing (from The Web Publishing State Page) to ensure that your directory structure, filenames, and web publishing features are not accessible.
Specifying a Server Home Page
When users first access your server, they usually use an URL such as http://www.mozilla.com/. When the server receives a request for this document, it returns a document called a home page. Usually, this file has general information about your server and links to other documents.
By default, the server finds the index file specified in the Index Filename field in the Document Preferences page and uses that for the home page. However, you can also specify a file to use as the home page in The Document Preferences Page of the Server Manager. For more information, see the online help.
Specifying a Default MIME Type
When a document is sent to a client, the server includes a section that identifies the document's type, so the client can present the document in the right way. However, sometimes the server can't determine the proper type for the document because the document's extension is not defined for the server. In those cases, a default value is sent. For information about maintaining your server's MIME types, see The Global MIME Types Page.
The default is usually text/plain, but you should set it to the type of file most commonly stored on your server. Some common MIME types include the following:
To specify a default MIME type, use The Document Preferences Page of the Server Manager. For more information, see the online help.
Parsing the Accept Language Header
When clients contact a server using HTTP 1.1, they can send header information describing the languages they accept. You can configure your server to parse this language information.
For example, if you store documents in Japanese and English, you could choose to parse the accept language header. When clients that have Japanese as the accept language header contact the server, they receive the Japanese version of the page. When clients that have English as the accept language header contact the server, they receive the English version.
If you do not support multiple languages, you should not parse the accept language header.
For more information on using the accept language header, see the section Using the Accept Language Header.
To parse the accept language header, use The Document Preferences Page in the Server Manager.
|