Page 1 of 1

Howto: getting a nicer Index of files in apache

PostPosted: Thu Aug 13, 2009 9:17 am
by Marc
Hi freesconians,

Like many of us I run apache_1.3.27_dingetje on my freesco box.
This well known application has the option to show a directory with files if there is no index.htm or index.shtml. It shows the files in a directory listing like at http://linux.dell.com/files/

Unfortunately there is no description in the Description column with the freesco standard Apache install and the size of the columns are sometimes too small.

Fortunately there is a solution.
Find the httpd.conf and edit it. (/usr/local/apache/conf/httpd.conf)
Find the section <IfModule mod_autoindex.c>
Add or change the following lines:

IndexOptions FancyIndexing
IndexOptions FoldersFirst
IndexOptions DescriptionWidth=*
IndexOptions NameWidth=*


And a few lines further down add or change the following lines:

AddDescription "GZIP compressed document" .gz
AddDescription "tar archive" .tar
AddDescription "GZIP compressed tar archive" .tgz
AddDescription "Portable Document Format file" .pdf
AddDescription "JPEG compressed image" .jpg
AddDescription "ASCII text file" .txt
AddDescription "Portable Network Graphics bitmapped image" .png
AddDescription "JPEG compressed image" .JPG
AddDescription "MSWindows executable file" .exe
AddDescription "Graphics Interchange Format image" .gif
AddDescription "HyperText Markup Language document" .htm
AddDescription "HyperText Markup Language document" .html


Save the file and restart apache with rc_httpd restart.

Now the index of files looks like this: http://pc1mh.nl.eu.org/files/
Wauw isnt that much better?

Marc

Re: Howto: getting a nicer Index of files in apache

PostPosted: Thu Aug 13, 2009 11:36 pm
by Lightning
You forgot one new file type that all FREESCO machines should have added.
AddDescription "Compressed package archive" .pkg