Project

General

Profile

Mod dirlisting » History » Revision 20

Revision 19 (stbuehler, 2009-02-17 10:39) → Revision 20/40 (stbuehler, 2009-02-17 10:40)

h1. Module mod_dirlisting - Directory Listings 

 {{toc}} {{>toc}} 

 h2. Description 

 mod_dirlisting is one of the modules that is loaded by default and doesn't have to be specified on server.modules to work. 

 A directory listing is generated if a directory is requested and no index-file was found in that directory. 

 To enable directory listings globally: 

    dir-listing.activate = "enable" 

 If you need it only for a directory, use conditionals: 

    $HTTP["url"] =~ "^/download($|/)" { 
      dir-listing.activate = "enable" 
    } 

 You can also use an external generator for directory listings if you use mod_indexfile. 

    index-file.names = ( "/dir-generator.php" ) 

 For those with an old config file, the obsolete value is: 

    server.indexfiles = ( "/dir-generator.php" ) 

 If a directory is requested, the dir-generator.php is called instead which can take the REQUEST_URI to see which directory was requested. 
 For large folders this is highly recommended. 

 h2. Options 

 h3. dir-listing.activate 

 enables virtual directory listings if a directory is requested no index-file was found.  
 default value: disable 

 h3. dir-listing.hide-dotfiles 

 if enabled, does not list hidden files in directory listings generated by the dir-listing option. 
 default value: disable 

 h3. dir-listing.external-css 

 path to an external css stylesheet for the directory listing. 

 h3. dir-listing.exclude 

 list of regular expressions. Files that match any of the specified regular expressions will be excluded from directory listings. 

 Use inside of conditionals was broken before 1.4.14. See #1260. 

 h3. dir-listing.encoding 

 set a encoding for the generated directory listing. 

 If your file-system is not using ASCII you have to set the encoding of the filenames as they are put into the HTML listing AS IS (with XML encoding). 

 Example: 

    dir-listing.encoding = "utf-8" 

 h3. dir-listing.show-readme 

 show the contents of the README.txt file after the directory listing. 
 default value: disable 

 h3. dir-listing.hide-readme-file 

 hide README.txt files from the directory listing. 
 default value: disable 

 h3. dir-listing.show-header 

 show the contents of the HEADER.txt file before the directory listing. 
 default value: disable 

 h3. dir-listing.hide-header-file 

 hide HEADER.txt files from the directory listing. 
 default value: disable 

 h3. dir-listing.set-footer 

 displays a string in the footer of a listing page. 
 default value: "<PACKAGE_NAME>/<PACKAGE_VERSION>" ie. "lighttpd/1.4.18"