Apache Directory Listing Enhancements

Migrated. Originally posted: 2008-11-30

Apache will display the contents of a directory, a file listing, similar to a directory listing on your computer. You can control how this listing is displayed with various directives.

I made a short presentation at the Ottawa Canada Linux User Group (OCLUG), Dec 2, 2008, on this subject.

In summary, the directives I discussed go into the “.htaccess” file in your directory. Those directives are:

– IndexOptions +FancyIndexing +DescriptionWidth=40
– Add Description “comment in quotes” file.name

To find out more about these directives, see the documentation for your version of Apache at: http://httpd.apache.org/docs-project/

And, besides .htaccess, the other special files I mention are:

– README.html – appears as the footer on the directory listing
– HEADER.html – appears at the top of the directory listing

These files should include HTML snippets.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s