23.2 Resource Configuration--srm.confThe srm.conf file is for server resource management--i.e., how local resources (e.g., documents) should be handled when requested by a client. AccessFileNameAccessFileName filename Specifies the name of directory access control files. The default is:
AccessFileName .htaccess AddAltAddAlt text filenames/suffixes ... Specifies alternative text for icons used with a given file listing in a directory index. The text is used as the first argument to the directive, followed by one or more file extensions or names. For example:
AddAlt IMAGE .gif .jpg .png AddAlt LOGO logo.gif AddAltByEncodingAddAltByEncoding text encoding_type Works similarly to AddAlt, except that it specifies alt text based on the MIME content encoding of the file being listed. For example, to specify the alt text "gzip" for a file encoded with gzip, the directive would be:
AddAltByEncoding gzip x-gzip AddAltByTypeAddAltByType text mime_type Works similarly to AddAlt, except that it specifies alt text based on the media type of the file being listed. For example, to use the alt text "IMAGE" for all image files, the directive would be:
AddAltByType IMAGE image/* AddDescriptionAddDescription text suffixes ... Used to associate a descriptive text phrase with a particular type of file. The text appears to the right of the file name in a directory index. The descriptive text must be surrounded by quotes and be fairly short. Files can be associated by extension or name. For example:
AddDescription "GIF Image File" .gif AddEncodingAddEncoding encoding-type suffixes ... Allows you to specify which MIME encodings should be associated with documents from your server. Encodings beginning with x- are used for unofficial encodings. For example:
AddEncoding x-gzip gz AddIconAddIcon pathname suffixes ... Specifies an icon image to be displayed with a given type of file in a directory index. For example:
AddIcon /icons/image.gif .gif .jpg .png An alternative syntax allows you to specify alt text in this directive as well:
AddIcon (IMAGE,/icons/image.gif) .gif .jpg .png There are three special values that can be used for the file extensions in the AddIcon directive: ^^DIRECTORY^^The icon will be used for subdirectory names. ..The icon will be used for the parent directory. ^^BLANKICON^^The icon is used only for spacing in the header of the page. AddIconByEncodingAddIconByEncoding filename encoding_type Specifies an icon to be displayed with a file in a directory index based on the file's encoding. Similar to the AddIcon directive, it can also specify alt text. For example:
AddIconByEncoding /icons/gzip.gif x-gzip AddIconByEncoding (GZIP,/icons/gzip.gif) x-gzip AddIconByTypeAddIconByType filename mime_type Specifies an icon to be displayed with a file in a directory index based on the file's media type. The directive may also specify alt text. For example:
AddIconByType /icons/image.gif image/* AddIconByType (IMAGE,/icons/image.gif) image/* AddLanguageAddLanguage language suffix Specifies that a certain extension should be associated with a certain language for purposes of content negotiation. For example, to associate the extension .francais with French documents, use the following setting:
AddLanguage fr .francais AddTypeAddType mime_type suffix|filename Specifies a MIME type and subtype to be associated with certain file extensions. For example, if you want to serve a Microsoft Word document:
AddType application/msword .doc AddType directives will override any extension-to-type mappings you have in your mime.types file. AliasAlias symbolic_path real_path Creates a virtual name or directory by mapping a virtual pathname that is used in a URL to a real path on your server. Aliasing is useful for organizing your server documents, keeping URLs simpler for users, and hiding the structure of your file system. For example, the icon directory is aliased in the default configuration file:
Alias /icons/ /usr/local/etc/httpd/icons With this setting, a request for /icons/image.gif is handled by sending the file /usr/local/etc/httpd/icons/image.gif. DefaultIconDefaultIcon filename Specifies what icon to use when none has been assigned by one of the AddIcon* directives. DefaultTypeDefaultType mime_type Establishes a default MIME type to be returned to a browser if the mappings found in the mime.types file are not adequate. The default is text/html. DirectoryIndexDirectoryIndex filenames ... Specifies the file that is returned when a URL identifies a directory on your server and no filename. If more than one file is listed, the first one that is present in the directory will be returned. The default is:
DirectoryIndex index.html index.shtml index.cgi DocumentRootDocumentRoot directory_path Specifies the root of the server document tree. For example:
DocumentRoot /usr/local/etc/httpd/htdocs/ ErrorDocumentErrorDocument code filename|string|URL Allows you to customize the response sent by your server when an error is encountered. The error code is an HTTP status code as listed in Chapter 18, Server Response Codes. Possible values are: filenameA local file to return upon retrieving this error stringA message to return upon retrieving this error. The string must be surrounded by quotes. URLA remote document to redirect the user to upon retrieving this error For example:
ErrorDocument 404 /errors/notfound.html ErrorDocument 408 "Sorry, the server timed out - try again later" ErrorDocument 402 http://www.ora.com/payment/ Note: the NCSA server only supports the filename syntax for this directive. FancyIndexingFancyIndexing On|Off Specifies that the server should create a fancy index for a directory listing, including filenames and icons representing the files' types, sizes, and last-modified dates. By default, fancy indexing is off. ForceTypeForceType mime_type Specifies that all files in this directory should be served with the specified type. Appropriate for inclusion in .htaccess files or within <Directory> section directives. HeaderNameHeaderName filename Specifies a file to be prepended to a file listing when generating a directory index. The example file uses the following setting:
HeaderName HEADER The server will look for this file name first with an .html extension, and failing that, without an extension. ImapMenuImapMenu option Under Apache, if an imagemap is called without valid coordinates, the server can return a menu of the items in the imagemap file. ImapMenu configures that menu. Options are: noneNo menu is created. The action specified with ImapDefault is taken. formattedA formatted menu is generated, with a listing of the possible links. semiformattedA menu with comments from the imagemap file and simple breaks is generated, with a listing of the possible links. unformattedA menu with the text of the imagemap file, unformatted. Useful if map files are written as HTML. ImapDefaultImapDefault option|URL Specifies the default action for imagemap files, if there is no default directive in the imagemap file itself. A URL can be specified, or one of the following options: errorFails with a server response code of 500 (See Chapter 18, Server Response Codes). nocontentSends a server response code of 204, telling the client to keep the same page displayed (see Chapter 18, Server Response Codes). mapUses the URL of the imagemap file, without coordinates (so a menu is generated unless specified otherwise). refererUses the referring document, or the server root if a Referer header is not specified. ImapBaseImapBase option|URL Specifies the default base for imagemap files, if there is no base directive in the imagemap file itself. A URL can be specified, or one of the following options: mapUses the URL of the imagemap file, without coordinates (so a menu is generated unless specified otherwise). refererUses the referring document, or the server root if a Referer header is not specified. IndexIgnoreIndexIgnore filenames ... Tells the server to ignore certain files when building a directory index on the fly. The files are specified as full server paths, and you can use the wildcards * and ? with their usual meanings. Thus, to ignore all hidden files (i.e., files whose names begin with a period) at every level, you could use the following setting:
IndexIgnore */.?* Any number of IndexIgnore directives may be included. IndexOptionsIndexOptions options ... Specifies a number of options to use when creating a directory index on the fly. Possible options are: NoneGenerate only plain directory indexes. FancyIndexingEquivalent to FancyIndexing On. Unless fancy indexing is turned on by either method, the other index options (except None) are ignored. IconsAreLinksMake the icons link to the documents (in addition to making the names link). ScanHTMLTitlesScan any HTML files in the directory, extract their titles, and use them as descriptions for the files. SuppressLastModOmit the last-modified date from the fancy index. SuppressSizeOmit the size from the fancy index. SuppressDescOmit the description from the fancy index. LanguagePriorityLanguagePriority languages ... Allows you to specify a ranking of languages, which is used in the event that a user's preferences are equal among language choices. For example:
LanguagePriority de it specifies German before Italian. ReadmeNameReadmeName filename Specifies a file to be appended to a file listing when generating a directory index. The example file uses the following setting:
ReadmeName README The server will look for this filename first with an .html extension, and failing that, without an extension. RedirectRedirect pathname url Tells the server to forward clients that request a given directory or document to a new location. ScriptAliasScriptAlias symbolic_path real_path Creates a virtual directory of CGI programs by mapping a virtual pathname that is used in a URL to a real directory of executable CGI programs on your server. Instead of returning a document in that directory, the server will run it within a CGI environment and return the output. See Chapter 9, CGI Overview, for more information on CGI. SetHandlerSetHandler handler Specifies that all files in the directory should be passed through the specified handler. Values are: cgi-scriptAll files treated as CGI scripts (see Chapter 9, CGI Overview) imap-fileAll files treated as imagemap files send-as-isAll files sent without additional server-supplied HTTP headers server-infoAll files sent with server configuration information server-parsedAll files parsed as server-side includes (see Chapter 13, Server Side Includes). type-mapAll files parsed as type map files for content negotiation UserDirUserDir directory_path Specifies the path within each user's home directory for their Web directories. The default value is public_html. To disable user directories, use this value:
UserDir DISABLED XBitHackXBitHack on|off|full Specifies the parsing of executable HTML documents. Options are: onFiles that are user-executable are treated as a server-parsed HTML document (SPML). offExecutable files are treated like regular files. fullFiles that are both user and group executable have the last modified time altered to match that of the returned document. |
|