The default Apache HTTP Server package includes a module, mod_autoindex, for displaying a directory listing as a Web page. The default display is simple and informative, but the module provides all sorts of controls to let you tweak and customize the output.
You want to see a directory listing when a directory is requested.
Turn on Options Indexes for the directory in question:
<Directory /www/htdocs/images> Options +Indexes </Directory>
When a URL maps to a directory or folder in the filesystem, Apache will respond to the request in one of three ways:
If mod_dir is part of the server configuration, and the mapped directory is within the scope of a DirectoryIndex directive, and the server can find one of the files identified in that directive, then the file will be used to generate the response.
If mod_autoindex is part of the server configuration and the mapped directory is within the scope of an Options directive that has enabled the Indexes keyword, then the server will construct a directory listing at runtime and supply it as the response.
The server will return a 404 (“
Resource Not Found”) status.
The real keys to enabling the server’s ability to
automatically generate a listing of files in a directory are the
inclusion of mod_autoindex in
the configuration and the
Indexes keyword to the
Options directive. This can be
done either as an absolute form, as in: