When Apache receives a request for a page that instead translates into a directory, the server will:
- Returns an index.html file if one is found.
- Displays a list of files in the requested directory.
- Return an error message if the file is not found (403, "access denied").
Apache supports an indexes option that you can apply globally, or per individual directory. Indexing can be a good thing and can also be a bad thing. If a user is unsure of a filename, indexing will list a directory's contents. If, however, you have files in a directory that are not for public consumption, directory indexing should be turned off globally and enabled only on a directory-by-directory basis.