Monkey Server v1.6

Directory Listing

The Directory Listing plugin allows to render the content of a directory in a friendly HTML interface when an index file do not exists. Take as an example the following Virtual Host directory content:


When hitting the example directory through the http://localhost/example/ URL, the server will try to lookup an index file, as described in the Server Core section, the IndexFile key defines which files can be an index, a few examples would be:

  • index.html
  • index.htm
  • index.php

If one of the entries on the IndexFile exists, the server will modify the target path /var/www/example/ and append the right index file. If no one exists, the server will return a 403 Forbidden HTTP error code.

Enable Plugin

If the plugin have not been built in static mode (check with '$ monkey -b'), you can enable the Directory Listing plugin through the following the steps mentioned on Plugins section. The plugin name is, so make sure the plugin entry is Load and the absolute path is correct.


Once the plugin is loaded, you need to define which Theme the plugin will use to render the directory content in HTML. At the moment the themes available are guineo and bootstrap.

The main configuration file resides in conf/plugins/dirlisting/dirlisting.conf, and it contain the following schema:

    Theme guineo

The principal section is [DIRLISTING] and allows just one key called Theme to specify which theme should be loaded. The theme directory must exists in the same path than dirlisting.conf exists.

As the Dirlisting plugin is a handler, it needs to be enabled on the Virtual Host definition under the HANDLERS sections through a Match rule. The following example will define a Handler rule to make the Dirlisting plugin process all incoming request that refers to a directory :

    Match  /.*  dirlisting