Ari Luotonen, CERN, 1994

Directory Browsing

By default references to directories which don't include a welcome page cause httpd to generate a hypertext view of the directory listing. There are numerous configuration directives controlling this feature:

Controlling Directory Browsing

DirAccess on
Enable directory browsing in all directories (which are not forbidden by rules). Synonym with -dy command line option. Default.

DirAccess off
Disable directory browsing. Synonym with -dn command line option.

DirAccess selective
Enable selective directory browsing - only directories containing the file .www_browsable are allowed. Synonym with -ds command line option.


README Feature

DirReadme top
For any browsable directeory containing a README file, include the text at the top of the directory listing. Synonym with -dt command line option. Default.

DirReadme bottom
Same as previous, but contents of README appear on the bottom. Synonym with -db command line option.

DirReadme off
Disables the README inclusion feature. Synonym with -dr command line option.


Controlling The Look of Directory Listings

The following On/Off directives control how the directory listings look like. The default is to show icons, use brackets around ALTernaltive text, show last-modifid, size and description, and allow filename field width to vary between 15-22 characters, and reserve 25 characters for description.

DirShowIcons
Generate inlined image calls in front of each line. Icons visualize the content-type of the file, and they are defined by AddIcon configuration directive. Default.

DirShowDate
Show last modification date. Default.

DirShowSize
Show the size of files. Default.

DirShowBytes
By default files smaller than 1K are shown as just 1K. Setting this directive to On will cause the exact byte count to appear.

DirShowDescription
Show description if available. Default.

At the time of release of 2.17 there was no consensus about where the descriptions come from, and the mechanism is currently undocumented. For HTML files description it the TITLE element; for other files the description field is left empty.

DirShowMaxDescrLenght
The maximum number of characters to show in the description field.

DirShowBrackets
Use brackets around ALTernative text used by browsers not capable of displaying images. Default.

DirShowHidden
Show hidden Unix files (the ones starting with a dot).

DirShowOwner
Show the owner of the file.

DirShowGroup
Show the group of the file.

DirShowMode
Show the permissions of files.

DirShowCase
Sort entries in a case-sensitive manner, i.e. all capital letters before lower-case letters.


Filename Length

There is a minimum and maximum width for the filename field. Entries longer than the maximum value will be truncated. Default values are 15 and 25, and they can be changed with these directives:
DirShowMinLength num
At least this amount of characters is always reserved for filenames. If the longest filename in the directory is longer than num the field will be extended, but no more than the maximum limit (see next directive).

DirShowMaxLength num
Filenames longer than num will be truncated to fit in length.

Example

The default values would be set by saying:
        DirShowMinLength  15
        DirShowMaxLength  25

httpd@info.cern.ch