[NANOWEB DOCUMENTATION]

NANOWEB, the aEGiS PHP web server

mod_fb

mod_fb is the »filebrowser« (directory listing generator) that got extracted from the main server (in 1.8.0-dev) to a module. As it now doesn't intermix with core server code it's easier to extend and more functions will be implemented in near future.

It currently takes these configuration directives:



FileBrowser

Syntax: FileBrowser = 1
Context: Server Config

Activates or Disables the automatic generation of directory listings. You shouldn't disable it however, as this is a essential service of nanoweb.
If a file with a name allowed in the DirectoryIndex directive exists in the requested directory no listing will be generated of course.



FBDescFile directive

Syntax: FBDescFile = .desc
Context: Server Config, Virtual Hosts, .nwaccess

Descriptions of each file out of a directory may be given in the file specified here. Such a description file should look like:

filename.ext   desc of this file
index.html  main/homepage...



FBIconByType directive

Syntax: FBIconByType = /icons/image.gif mime/type
Context: Server Config, Virtual Hosts, .nwaccess

Associates icons pictures to mime types for output in directory listings produced by mod_fb.
You may specify partial mime-types only; so you can associtate fall-back icons for general mime types like »application«, »text« or »image«.
The default configuration of nanoweb also utilizes the Alias directive to keep all icons in a single directory (/icons/ which is rewritten to absolute real path /var/www/icons/) accessible from all the virtual hosts.



FBIconDefault directive

Syntax: FBIconDefault = /icons/misc.gif
Context: Server Config, Virtual Hosts, .nwaccess

If none of the FBIconByType directives defines an appropriate icon for a file (or if a files mime type is unknown) this directive gives the name of the image to be used.



FBIconDirectory directive

Syntax: FBIconDirectory = /icons/directory.gif
Context: Server Config, Virtual Hosts, .nwaccess

Defines the icon to be printed for directories.



FBShowDotFiles directive

Syntax: FBShowDotFiles = 1
Context: Server Config, Virtual Hosts, .nwaccess

This tells mod_fb to include files which names start with a dot to be included in directory listings. On UNIX machines these »dotfiles« should be treaten as invisible files by standard programs; and because nanoweb keeps some of its per-directory configurations in .nwaccess and .nwauth you probably want to set this directive to the default of 1.



FBSortOrder directive

Syntax: FBSortOrder = name | size | date [ desc ]
Context: Server Config, Virtual Hosts, .nwaccess

Directory listings are sorted by mod_fb according to this setting (»name« is the default). The use of »desc« reverses the order.



FBTemplateFooter directive

Syntax: FBTemplateFooter = .fbfooter
Context: Server Config, Virtual Hosts

Define a footer template filename (printed below directory listings).
The macro "@genpage_signature@" can be used in such a file to display the standard nanoweb server signature.



FBTemplateHeader directive

Syntax: FBTemplateHeader = .fbheader
Context: Server Config, Virtual Hosts, .nwaccess

Define a header template for use with the file browser.
Available macros for use in the files specified with this directive are "@real_uri@" to display the requested directory, and "@welcome_formated@" for the formated welcome file (if any is present).



FBWelcomeFile directive

Syntax: FBWelcomeFile = .welcome
Context: Server Config, Virtual Hosts, .nwaccess

Whenever a directory listing (»filebrowser«) is to be sent back to the client, the server searches for a file with the hereby given name to be included in the sent output.




NANOWEB, the aEGiS PHP web server