Manage delivery of local content

The Pass and Exec mapping rules are used to deliver local content to a requesting client. By default, a Pass rule with a wildcard template is placed as the last mapping rule. This rule directs all requests that do not match previous templates to retrieve files from a target directory, which is commonly referred to as the document root directory.

When a URL is received that does not contain a file name, Caching Proxy satisfies the request by searching the specified directory, if one is given, or the document root directory, if no directory is specified, for a file that matches the list of welcome pages specified in the configuration file. If more than welcome page is defined, the proxy server searches for the pages in the order in which they are defined. The first welcome page found is served.

The server home page is the Web page that the server delivers by default when it receives a request that contains only the server's URL without a directory or file name. As previously explained, the default wildcard mapping rule requires that the server home page is stored in the document root directory and that the filename of the home page matches a defined welcome page.

Note:
Some Web browsers use the term home page to refer to the first page the browser loads when it is started. This document uses the term only for the server home page.

This topic describes how to define the document root directory and welcome pages.

Define document root directory

The default document root directories are:

Associated directives

The following directive defines the document root directory:

For more information, refer to Manually editing the ibmproxy.conf file.

Configuration and Administration forms

To change the document root directory in the Configuration and Administration forms, use the following procedure:

  1. Select Server Configuration -> Request Processing -> Request Routing.
  2. In the request routing table, find the row that contains the string /* (slash asterisk) in the Request Template column. This represents the document root directory. In the Index box below the table, click the number that corresponds to the number in the Index column for that row.
  3. Click Replace.
  4. In the Action drop-down list, click Pass.
  5. Type /* in the URL Request Template field.
  6. Type your new document root directory in the Replacement File Path field.
  7. Click Submit.
  8. After your changes are accepted, click the Restart Server icon (|) in the upper frame.

After restarting, the server begins to use the new document root directory.

For more information, refer to Using the Configuration and Administration forms.

Define default welcome pages

The server looks for the home page in the document root directory, but the specific file it returns is defined by the list of welcome pages.

About welcome pages

When the server receives a URL request that does not specify a file name, it tries to satisfy the request according to a list of welcome pages set in the server's configuration file. This list defines files to use as default home pages. The server determines your home page by matching the list of welcome pages to the files in the document root directory. The first match it finds is the file returned as your home page. If no match is found, the server displays a listing of the document root directory.

To have a particular file used as your server's home page and returned when a request does not specify either a directory or file name, you must put the file in the document root directory and also make sure that its name matches one of the file names listed in the list of welcome pages.

The default configuration file defines these file names, in this order, to be used as welcome pages:

  1. welcome.html or welcome.htm
  2. index.html or index.htm
  3. Frntpage.html

The server returns the first file it finds that matches a file name in the list. Until you create a welcome.html or index.html file and place that file in the document root directory, the server uses Frntpage.html as your home page.

For example, if you are using the default configuration and your document root directory does not contain a file named welcome.html, but does contain files named index.html and FrntPage.html, the index.html file is used as your home page.

If no home page is found, the contents of the document root directory are displayed as a directory.

Associated directives

The following directive defines the welcome pages:

For more information, refer to Manually editing the ibmproxy.conf file.

Configuration and Administration forms

The following Configuration and Administration form defines the welcome pages:

For more information, refer to Using the Configuration and Administration forms.