3421N/A<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
3421N/A<
TITLE>Apache module mod_dir</
TITLE>
3421N/A<!-- Background white, links blue (unvisited), navy (visited), red (active) --> 3421N/A<
H1 ALIGN="CENTER">Module mod_dir</
H1>
3421N/Ais compiled in by default. It provides for directory indexing.
3421N/AThis module controls the directory indexing. The index of a directory
3421N/Acan come from one of two sources:
3421N/AThe <
A HREF="#directoryindex">DirectoryIndex</
A> directive sets the name
3421N/A<
li>Otherwise, a listing generated by the server. The other directives
3421N/Acontrol the format of this listing. The <
A HREF="#addicon">AddIcon</
A>,
3421N/A<
A HREF="#addiconbyencoding">AddIconByEncoding</
A> and
3421N/A<
A HREF="#addiconbytype">AddIconByType</
A> are used to set a list of
3421N/Aicons to display for various file types; for each file listed, the
3421N/Afirst icon listed that matches the file is displayed.
3421N/A<
li><
A HREF="#addalt">AddAlt</
A>
3421N/A<
li><
A HREF="#addaltbyencoding">AddAltByEncoding</
A>
3421N/A<
li><
A HREF="#addaltbytype">AddAltByType</
A>
3421N/A<
li><
A HREF="#adddescription">AddDescription</
A>
3421N/A<
li><
A HREF="#addicon">AddIcon</
A>
3421N/A<
li><
A HREF="#addiconbyencoding">AddIconByEncoding</
A>
3421N/A<
li><
A HREF="#addiconbytype">AddIconByType</
A>
3421N/A<
li><
A HREF="#defaulticon">DefaultIcon</
A>
3421N/A<
li><
A HREF="#directoryindex">DirectoryIndex</
A>
3421N/A<
li><
A HREF="#fancyindexing">FancyIndexing</
A>
3421N/A<
li><
A HREF="#headername">HeaderName</
A>
3421N/A<
li><
A HREF="#indexignore">IndexIgnore</
A>
3421N/A<
li><
A HREF="#indexoptions">IndexOptions</
A>
3421N/A<
li><
A HREF="#readmename">ReadmeName</
A>
3421N/A<
A name="addalt"><
h2>AddAlt</
h2></
A>
3421N/A<!--%plaintext <?INDEX {\tt AddAlt} directive> --> 3421N/A<
strong>Syntax:</
strong> AddAlt <
em>string file file...</
em><
br>
3421N/A<
Strong>Context:</
strong> server config, virtual host, directory, .htaccess<
br>
3421N/A<
Strong>Override:</
strong> Indexes<
br>
3421N/A<
strong>Status:</
strong> Base<
br>
3421N/A<
strong>Module:</
strong> mod_dir<
p>
3421N/AThis sets the alternate text to display for a file, instead of an icon, for
3421N/A<
A HREF="#fancyindexing">FancyIndexing</
A>. <
em>File</
em> is a file
3421N/Aextension, partial filename, wild-card expression or full filename for files
3421N/Ato describe. <
em>String</
em> is enclosed in double quotes
3421N/A(<
code>"</
code>). This alternate text is displayed if the client is
3421N/Aimage-incapable or has image loading disabled.
3421N/A<
A name="addaltbyencoding"><
h2>AddAltByEncoding</
h2></
A>
3421N/A<!--%plaintext <?INDEX {\tt AddAltByEncoding} directive> --> 3421N/A<
strong>Syntax:</
strong> AddAltByEncoding <
em>string MIME-encoding
3421N/A<
Strong>Context:</
strong> server config, virtual host, directory, .htaccess<
br>
3421N/A<
Strong>Override:</
strong> Indexes<
br>
3421N/A<
strong>Status:</
strong> Base<
br>
3421N/A<
strong>Module:</
strong> mod_dir<
p>
3421N/AThis sets the alternate text to display for a file, instead of an icon, for
3421N/A<
A HREF="#fancyindexing">FancyIndexing</
A>. <
em>MIME-encoding</
em> is a
3421N/Avalid content-encoding, such as <
SAMP>x-compress</
SAMP>.
3421N/A<
em>String</
em> is enclosed in double quotes
3421N/A(<
code>"</
code>). This alternate text is displayed if the client is
3421N/Aimage-incapable or has image loading disabled.
3421N/A<
A name="addaltbytype"><
h2>AddAltByType</
h2></
A>
3421N/A<!--%plaintext <?INDEX {\tt AddAltByType} directive> --> 3421N/A<
strong>Syntax:</
strong> AddAltByType <
em>string MIME-type MIME-type...</
em><
br>
3421N/A<
Strong>Context:</
strong> server config, virtual host, directory, .htaccess<
br>
3421N/A<
Strong>Override:</
strong> Indexes<
br>
3421N/A<
strong>Status:</
strong> Base<
br>
3421N/A<
strong>Module:</
strong> mod_dir<
p>
3421N/AThis sets the alternate text to display for a file, instead of an icon, for
3421N/A<
A HREF="#fancyindexing">FancyIndexing</
A>. <
em>MIME-type</
em> is a
3421N/A<
em>String</
em> is enclosed in double quotes
3421N/A(<
code>"</
code>). This alternate text is displayed if the client is
3421N/Aimage-incapable or has image loading disabled.
3421N/A<
A name="adddescription"><
h2>AddDescription</
h2></
A>
3421N/A<!--%plaintext <?INDEX {\tt AddDescription} directive> --> 3421N/A<
strong>Syntax:</
strong> AddDescription <
em>string file file...</
em><
br>
3421N/A<
Strong>Context:</
strong> server config, virtual host, directory, .htaccess<
br>
3421N/A<
Strong>Override:</
strong> Indexes<
br>
3421N/A<
strong>Status:</
strong> Base<
br>
3421N/A<
strong>Module:</
strong> mod_dir<
p>
3421N/AThis sets the description to display for a file, for
3421N/A<
A HREF="#fancyindexing">FancyIndexing</
A>. <
em>File</
em> is a file
3421N/Aextension, partial filename, wild-card expression or full filename for files
3421N/Ato describe. <
em>String</
em> is enclosed in double quotes
3421N/A(<
code>"</
code>). Example:
3421N/A<
A name="addicon"><
h2>AddIcon</
h2></
A>
3421N/A<!--%plaintext <?INDEX {\tt AddIcon} directive> --> 3421N/A<
strong>Syntax:</
strong> AddIcon <
em>icon name name ...</
em><
br>
3421N/A<
Strong>Context:</
strong> server config, virtual host, directory, .htaccess<
br>
3421N/A<
Strong>Override:</
strong> Indexes<
br>
3421N/A<
strong>Status:</
strong> Base<
br>
3421N/A<
strong>Module:</
strong> mod_dir<
p>
3421N/AThis sets the icon to display next to a file ending in <
em>name</
em> for
3421N/A<
A HREF="#fancyindexing">FancyIndexing</
A>. <
em>Icon</
em> is either a
3421N/A(%-escaped) relative URL to the icon, or of the format
3421N/A(<
em>alttext</
em>,<
em>url</
em>) where <
em>alttext</
em> is the text tag given
3421N/Afor an icon for non-graphical browsers.<
p>
3421N/A<
em>Name</
em> is either ^^DIRECTORY^^ for directories, ^^BLANKICON^^ for
3421N/Ablank lines (to format the list correctly), a file extension, a wildcard
3421N/Aexpression, a partial filename or a complete filename. Examples:
3421N/A<
A HREF="#addiconbytype">AddIconByType</
A> should be used in preference to
3421N/AAddIcon, when possible.<
p><
hr>
3421N/A<
A name="addiconbyencoding"><
h2>AddIconByEncoding</
h2></
A>
3421N/A<!--%plaintext <?INDEX {\tt AddIconByEncoding} directive> --> 3421N/A<
strong>Syntax:</
strong> AddIconByEncoding <
em>icon mime-encoding mime-encoding
3421N/A<
Strong>Context:</
strong> server config, virtual host, directory, .htaccess<
br>
3421N/A<
Strong>Override:</
strong> Indexes<
br>
3421N/A<
strong>Status:</
strong> Base<
br>
3421N/A<
strong>Module:</
strong> mod_dir<
p>
3421N/AThis sets the icon to display next to files with
3421N/A<
em>mime-encoding</
em> for <
A HREF="#fancyindexing">FancyIndexing</
A>.
3421N/A<
em>Icon</
em> is either a (%-escaped) relative URL to the icon, or of the
3421N/Aformat (<
em>alttext</
em>,<
em>url</
em>) where <
em>alttext</
em> is the text tag
3421N/Agiven for an icon for non-graphical browsers.<
p>
3421N/A<
em>Mime-encoding</
em> is a wildcard expression matching required the
3421N/A<
A name="addiconbytype"><
h2>AddIconByType</
h2></
A>
3421N/A<!--%plaintext <?INDEX {\tt AddIconByType} directive> --> 3421N/A<
strong>Syntax:</
strong> AddIconByType <
em>icon mime-type mime-type ...</
em><
br>
3421N/A<
Strong>Context:</
strong> server config, virtual host, directory, .htaccess<
br>
3421N/A<
Strong>Override:</
strong> Indexes<
br>
3421N/A<
strong>Status:</
strong> Base<
br>
3421N/A<
strong>Module:</
strong> mod_dir<
p>
3421N/AThis sets the icon to display next to files of type <
em>mime-type</
em> for
3421N/A<
A HREF="#fancyindexing">FancyIndexing</
A>. <
em>Icon</
em> is either a
3421N/A(%-escaped) relative URL to the icon, or of the format
3421N/A(<
em>alttext</
em>,<
em>url</
em>) where <
em>alttext</
em> is the text tag given
3421N/Afor an icon for non-graphical browsers.<
p>
3421N/A<
em>Mime-type</
em> is a wildcard expression matching required the mime types.
3421N/A<
A name="defaulticon"><
h2>DefaultIcon</
h2></
A>
3421N/A<!--%plaintext <?INDEX {\tt DefaultIcon} directive> --> 3421N/A<
strong>Syntax:</
strong> DefaultIcon <
em>url</
em><
br>
3421N/A<
Strong>Context:</
strong> server config, virtual host, directory, .htaccess<
br>
3421N/A<
Strong>Override:</
strong> Indexes<
br>
3421N/A<
strong>Status:</
strong> Base<
br>
3421N/A<
strong>Module:</
strong> mod_dir<
p>
3421N/AThe DefaultIcon directive sets the icon to display for files when no
3421N/Aspecific icon is known, for <
A HREF="#fancyindexing">FancyIndexing</
A>.
3421N/A<
em>Url</
em> is a (%-escaped) relative URL to the icon. Examples:
3421N/A<
A name="directoryindex"><
h2>DirectoryIndex</
h2></
A>
3421N/A<!--%plaintext <?INDEX {\tt DirectoryIndex} directive> --> 3421N/A<
strong>Syntax:</
strong> DirectoryIndex <
em>local-url local-url ...</
em><
br>
3421N/A<
Strong>Context:</
strong> server config, virtual host, directory, .htaccess<
br>
3421N/A<
Strong>Override:</
strong> Indexes<
br>
3421N/A<
strong>Status:</
strong> Base<
br>
3421N/A<
strong>Module:</
strong> mod_dir<
p>
3421N/AThe DirectoryIndex directive sets the list of resources to look for,
3421N/Awhen the client requests an index of the directory by specifying a /
3421N/Aat the end of the a directory name. <
em>Local-url</
em> is the
3421N/A(%-encoded) URL of a document on the server relative to the requested
3421N/Adirectory; it is usually the name of a file in the directory. Several
3421N/AURLs may be given, in which case the server will return the first one
3421N/Athat it finds. If none of the resources exist and the
3421N/A<
CODE>Indexes</
CODE> option is set, the server will generate its own
3421N/Athe directory if it did not. <
p>
3421N/ANote that the documents do not need to be relative to the directory;
3421N/A<
A name="fancyindexing"><
h2>FancyIndexing</
h2></
A>
3421N/A<!--%plaintext <?INDEX {\tt FancyIndexing} directive> --> 3421N/A<
strong>Syntax:</
strong> FancyIndexing <
em>boolean</
em><
br>
3421N/A<
Strong>Context:</
strong> server config, virtual host, directory, .htaccess<
br>
3421N/A<
Strong>Override:</
strong> Indexes<
br>
3421N/A<
strong>Status:</
strong> Base<
br>
3421N/A<
strong>Module:</
strong> mod_dir<
p>
3421N/AThe FancyIndexing directive sets the FancyIndexing option for a directory.
3421N/A<
em>Boolean</
em> can be <
code>on</
code> or <
code>off</
code>. The
3421N/A<
A HREF="#indexoptions">IndexOptions</
A> directive should be used in
3421N/A<
A name="headername"><
h2>HeaderName</
h2></
A>
3421N/A<!--%plaintext <?INDEX {\tt HeaderName} directive> --> 3421N/A<
strong>Syntax:</
strong> HeaderName <
em>filename</
em><
br>
3421N/A<
Strong>Context:</
strong> server config, virtual host, directory, .htaccess<
br>
3421N/A<
Strong>Override:</
strong> Indexes<
br>
3421N/A<
strong>Status:</
strong> Base<
br>
3421N/A<
strong>Module:</
strong> mod_dir<
p>
3421N/AThe HeaderName directive sets the name of the file that will be inserted
3421N/Aat the top of the index listing. <
em>Filename</
em> is the name of the file
3421N/Ato include, and is taken to be relative to the directory being indexed.
3421N/AThe server first attempts to include <
em>filename</
em><
code>.html</
code>
3421N/Aas an HTML document, otherwise it will include <
em>filename</
em> as plain
3421N/A<
blockquote><
code>HeaderName HEADER</
code></
blockquote>
3421N/Awhen indexing the directory <
code>/web</
code>, the server will first look for
3421N/Ait will include the plain text file <
code>/
web/
HEADER</
code>, if it exists.
3421N/A<
p>See also <
A HREF="#readmename">ReadmeName</
A>.<
p><
hr>
3421N/A<
A name="indexignore"><
h2>IndexIgnore</
h2></
A>
3421N/A<!--%plaintext <?INDEX {\tt IndexIgnore} directive> --> 3421N/A<
strong>Syntax:</
strong> IndexIgnore <
em>file file ...</
em><
br>
3421N/A<
Strong>Context:</
strong> server config, virtual host, directory, .htaccess<
br>
3421N/A<
Strong>Override:</
strong> Indexes<
br>
3421N/A<
strong>Status:</
strong> Base<
br>
3421N/A<
strong>Module:</
strong> mod_dir<
p>
3421N/AThe IndexIgnore directive adds to the list of files to hide when listing
3421N/Aa directory. <
em>File</
em> is a file extension, partial filename,
3421N/Awildcard expression or full filename for files to ignore. Multiple
3421N/AIndexIgnore directives add to the list, rather than the replacing the list
3421N/Aof ignored files. By default, the list contains `<
code>.</
code>'. Example:
3421N/AIndexIgnore README .htaccess *~
3421N/A<
A name="indexoptions"><
h2>IndexOptions</
h2></
A>
3421N/A<!--%plaintext <?INDEX {\tt IndexOptions} directive> --> 3421N/A<
strong>Syntax:</
strong> IndexOptions <
em>option option ...</
em><
br>
3421N/A<
Strong>Context:</
strong> server config, virtual host, directory, .htaccess<
br>
3421N/A<
Strong>Override:</
strong> Indexes<
br>
3421N/A<
strong>Status:</
strong> Base<
br>
3421N/A<
strong>Module:</
strong> mod_dir<
p>
3421N/AThe IndexOptions directive specifies the behavior of the directory indexing.
3421N/A<
em>Option</
em> can be one of
3421N/A<
dd>
<!--%plaintext <?INDEX {\tt FancyIndexing} index option> --> 3421N/AThis turns on fancy indexing of directories.
3421N/A<!--%plaintext <?INDEX {\tt IconsAreLinks} index option> --> 3421N/AThis makes the icons part of the anchor for the filename, for
3421N/A<
dd>
<!--%plaintext <?INDEX {\tt ScanHTMLTitles} index option> --> 3421N/AThis enables the extraction of the title from HTML documents for fancy
3421N/Aindexing. If the file does not have a description given by
3421N/A<
A HREF="#adddescription">AddDescription</
A> then httpd will read the
3421N/Adocument for the value of the TITLE tag. This is CPU and disk intensive.
3421N/A<!--%plaintext <?INDEX {\tt SuppressLastModified} index option> --> 3421N/AThis will suppress the display of the last modification date, in fancy
3421N/A<!--%plaintext <?INDEX {\tt SuppressSize} index option> --> 3421N/AThis will suppress the file size in fancy indexing listings.
3421N/A<!--%plaintext <?INDEX {\tt SuppressDescription} index option> --> 3421N/AThis will suppress the file description in fancy indexing listings.
3421N/AThis default is that no options are enabled. If multiple IndexOptions
3421N/Acould apply to a directory, then the most specific one is taken complete;
3421N/Athe options are not merged. For example:
3421N/AIndexOptions FancyIndexing <
br>
3421N/AIndexOptions ScanHTMLTitles <
br>
3421N/A<
A name="readmename"><
h2>ReadmeName</
h2></
A>
3421N/A<!--%plaintext <?INDEX {\tt ReadmeName} directive> --> 3421N/A<
strong>Syntax:</
strong> ReadmeName <
em>filename</
em><
br>
3421N/A<
Strong>Context:</
strong> server config, virtual host, directory, .htaccess<
br>
3421N/A<
Strong>Override:</
strong> Indexes<
br>
3421N/A<
strong>Status:</
strong> Base<
br>
3421N/A<
strong>Module:</
strong> mod_dir<
p>
3421N/AThe ReadmeName directive sets the name of the file that will be appended
3421N/Ato the end of the index listing. <
em>Filename</
em> is the name of the file
3421N/Ato include, and is taken to be relative to the directory being indexed.
3421N/AThe server first attempts to include <
em>filename</
em><
code>.html</
code>
3421N/Aas an HTML document, otherwise it will include <
em>filename</
em> as plain
3421N/A<
blockquote><
code>ReadmeName README</
code></
blockquote>
3421N/Awhen indexing the directory <
code>/web</
code>, the server will first look for
3421N/Ait will include the plain text file <
code>/
web/
README</
code>, if it exists.
3421N/A<
p>See also <
A HREF="#headername">HeaderName</
A>.<
p>