The DIR module
This module handles displaying file system directories, either
by viewing a specific document or by listing the files (and subdirectories)
in the directory.
System issues
Causes the server to close Keep-Alive sockets after the directory
listing has been sent.
Configuration options (dir.conf)
- index-file-path (string)
- A colon-separated list of files to try when searching for an index
document for a directory. Defaults to "index.html:Welcome.html".
- directory-icons (table)
- A table of HTML constructs to display icons for file entries in
the directory listing.
- add-href (table)
- A table of HREF data to be added before the filename, for entries ending
with the specified suffix.
- allow-dir-listing (boolean)
- This enables the output of a directory listing, if no index-file is found. The default is
NOT to give a directory listing.
Example configuration file
# dir.conf
index-file-path = index.html:Welcome.html
# allow-dir-listing = no
directory-icons = {
.xbm <IMG SRC="/icons/image.xbm" ALT="* " BORDER=0 HSPACE=5>
.gif <IMG SRC="/icons/image.xbm" ALT="* " BORDER=0 HSPACE=5>
.html <IMG SRC="/icons/text.xbm" ALT="* " BORDER=0 HSPACE=5>
.txt <IMG SRC="/icons/text.xbm" ALT="* " BORDER=0 HSPACE=5>
.map <IMG SRC="/icons/text.xbm" ALT="* " BORDER=0 HSPACE=5>
.cgi <IMG SRC="/icons/binary.xbm" ALT="* " BORDER=0 HSPACE=5>
}
add-href = {
.zip /cgi-bin/WebZip?path=
}