Sunday, January 13, 2008

Folder Listing in Apache

Default configuration value for folder listing in recent Apache servers seems to change. Now, by default, we cannot list folder contents without an index file. To allow folder listing without an index file, we need to set an option properly. If we start from a fresh installation of Apache 2.2, the default option is

Options FollowSymLinks

We can change it to

Options Indexes FollowSymLinks

And, directory listing will work just fine. Note: 'Deny from all' directive may still prevent us from viewing a page. We can delete or comment out the directive to view contents.

To make folder listing looks better, we should also employ fancy style by uncomment the second following line:
# Fancy directory listings
#Include conf/extra/httpd-autoindex.conf

Please consult http://httpd.apache.org/docs/1.3/mod/core.html#options for details.

No comments: