How to enable Fancy Directory Indexing in Apache 2.2
- cd /usr/local/apache/conf/extra and verify that httpd-autoindex.conf exists. Don’t do anything with it, just make sure it is there.
- open /usr/local/apache/conf/httpd.conf and do a find and look for the section of the config where some “IfModule” entries exist. Then enter this module somewhere in that section:
<IfModule mod_autoindex.c>
IndexOptions FancyIndexing IconHeight=16 IconWidth=16
</IfModule>(EDIT: HelloAdam suggested that we should use IconHeight=22 IconWidth=20 instead, as these are the values that Apache 1.3 used)
- Exit the edit session and save your work.
- Now you must “distill” the changes (assuming you are using Easy Apache). Enter this command:
/usr/local/cpanel/bin/apache_conf_distiller –update
You should get back “Distilled successfully”.
- Now you will rebuild your httpd.conf, and see if the changes you made stuck. Enter this command:
/usr/local/cpanel/bin/build_apache_conf
You should get back “Built /usr/local/apache/conf/httpd.conf OK”
- Open /usr/local/apache/conf/httpd.conf again, and make sure that your IfModule addition is still there. If so, success !!
- Restart Apache. I prefer to do it via WHM’s Restart Apache link. YMMV.
I have attached screen shots of a directory listing, BEFORE and AFTER.
I hope this is useful to someone.
references
http://forums.cpanel.net/f5/how-enable-fancy-directory-indexing-apache-2-2-a-105721.html