The second feature of maps (missing from similar mechanisms in other servers) is that the module they invoke may in turn invoke other modules. The authhost module is one example of this. It invokes the file module if the host authorization fails and a file name is given. The file module takes one argument - a file name. It returns that file when it is invoked, without regard to the URL being used.
Another example of a module invoking a second module internally can be found in the userdir module. This module implements the user directory mapping found in other servers. Its one argument is the name of the directory to look for in the user's home directory. It looks up the users home directory in the password file, appends its argument, and then invokes the directory module to actually send any file that may exist.
For example, to mimic the default NCSA behavior, use the map:
map /~ userdir public_html
Since this facility is usually an integral part of the server,
servers allow only one prefix, and only one public directory name.
Since a module can be used as many times as needed, and falls through,
both cases can be handled here. To allow users to use
/home/username to search the directory
html in their home directory as well as /~
to search public_html, add the following map to the
configuration file:
map /home/ userdir html