The srm.conf file is for server resource management--i.e., how local resources (e.g., documents) should be handled when requested by a client.
AccessFileName filename
Specifies the name of directory access control files. The default is:
AccessFileName .htaccess
AddAlt 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
AddAltByEncoding 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
AddAltByType 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/*
AddDescription 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
AddEncoding 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
AddIcon 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:
The icon will be used for subdirectory names.
The icon will be used for the parent directory.
The icon is used only for spacing in the header of the page.
AddIconByEncoding 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
AddIconByType 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/*
AddLanguage 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
AddType 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.
Alias 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.
DefaultIcon filename
Specifies what icon to use when none has been assigned by one of the AddIcon* directives.
DefaultType 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.
DirectoryIndex 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
DocumentRoot directory_path
Specifies the root of the server document tree. For example:
DocumentRoot /usr/local/etc/httpd/htdocs/
ErrorDocument 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:
A local file to return upon retrieving this error
A message to return upon retrieving this error. The string must be surrounded by quotes.
A 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.
FancyIndexing 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.
ForceType 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.
HeaderName 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.
ImapMenu 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:
No menu is created. The action specified with ImapDefault is taken.
A formatted menu is generated, with a listing of the possible links.
A menu with comments from the imagemap file and simple breaks is generated, with a listing of the possible links.
A menu with the text of the imagemap file, unformatted. Useful if map files are written as HTML.
ImapDefault 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:
Fails with a server response code of 500 (See \ \#shttpstatus).
Sends a server response code of 204, telling the client to keep the same page displayed (see \ \#shttpstatus).
Uses the URL of the imagemap file, without coordinates (so a menu is generated unless specified otherwise).
Uses the referring document, or the server root if a Referer header is not specified.
ImapBase 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:
Uses the URL of the imagemap file, without coordinates (so a menu is generated unless specified otherwise).
Uses the referring document, or the server root if a Referer header is not specified.
IndexIgnore 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.
IndexOptions options ...
Specifies a number of options to use when creating a directory index on the fly. Possible options are:
Generate only plain directory indexes.
Equivalent to FancyIndexing On. Unless fancy indexing is turned on by either method, the other index options (except None) are ignored.
Make the icons link to the documents (in addition to making the names link).
Scan any HTML files in the directory, extract their titles, and use them as descriptions for the files.
Omit the last-modified date from the fancy index.
Omit the size from the fancy index.
Omit the description from the fancy index.
LanguagePriority 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.
ReadmeName 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.
Redirect pathname url
Tells the server to forward clients that request a given directory or document to a new location.
ScriptAlias 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.
SetHandler handler
Specifies that all files in the directory should be passed through the specified handler. Values are:
All files treated as CGI scripts (see \ \#scgiintro)
All files treated as imagemap files
All files sent without additional server-supplied HTTP headers
All files sent with server configuration information
All files parsed as server-side includes (see Chapter 13, Server Side Includes).
All files parsed as type map files for content negotiation
UserDir 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
XBitHack on|off|full
Specifies the parsing of executable HTML documents. Options are:
Files that are user-executable are treated as a server-parsed HTML document (SPML).
Executable files are treated like regular files.
Files that are both user and group executable have the last modified time altered to match that of the returned document.