Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > Web Server > Issue <<  59 of 73 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 8251
Last update: 08-28-06
Issue:
How can I customize the automatically generated directory listings Apache creates?
Resolution:

The mod_autoindex module is used for automatic directory listings.

All of these options can be added in a virtual host section, a directory section, or in the main configuration section. These can be added to the bottom of /etc/httpd/conf/httpd.conf file.

To add comments for all files of the same type, add:

AddDescription "This is a text file" .txt

This would add the description "This is a text file" to any file that ended in the .txt extension.

To add a description for a particular file:

AddDescription "Our financial report" docs/finances.txt

This would add the description "Our financial report" to the docs/finances.txt file.

To have the index ignore some files, add:

IndexIgnore  docs/hidden.txt

Now when the directory listing of docs is viewed, it will not show the file hidden.txt.

For other available options see http://httpd.apache.org/docs/2.0/mod/mod_autoindex.html.


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > Web Server > Issue <<   59  of  73  >>