Howto: getting a nicer Index of files in apache

If it does not fit any where else, then post it here.
SPAM is not allowed, here or any other forums

Howto: getting a nicer Index of files in apache

Postby Marc » Thu Aug 13, 2009 9:17 am

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
User avatar
Marc
Senior Member
 
Posts: 85
Joined: Fri May 17, 2002 3:42 pm
Location: The kingdom of the Netherlands, Twente

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

Postby Lightning » Thu Aug 13, 2009 11:36 pm

You forgot one new file type that all FREESCO machines should have added.
AddDescription "Compressed package archive" .pkg
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 3046
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA


Return to Other Discussions

Who is online

Users browsing this forum: No registered users and 1 guest