7.1. Making Better Indexes in Apache
There is a wide range of possibilities; some are demonstrated at ... /site.fancyindex :
User webuser Group webgroup ServerName www.butterthlies.com DocumentRoot /usr/www/site.fancyindex/htdocs <Directory /usr/www/site.fancyindex/htdocs> FancyIndexing on AddDescription "One of our wonderful catalogs" catalog_summer.html catalog autumn.html IndexIgnore *.jpg IndexIgnore .. IndexIgnore icons HEADER README AddIconByType (CAT,icons/bomb.gif) text/* DefaultIcon icons/burst.gif #AddIcon (DIR,icons/burst.gif) ^^DIRECTORY^^ HeaderName HEADER ReadMeName README </Directory>
When you type go on the server and access http://www.butterthlies.com/ on the browser, you should see a rather fancy display:
Welcome to BUTTERTHLIES INC Name Last Modified Size Description -------------------------------------------------------------------- <bomb> catalog_autumn.html 23-Jul-1998 09:11 1k One of our wonderful catalogs <bomb> catalog_summer.html 25-Jul-1998 10:31 1k One of our wonderful catalogs <burst> index.html.ok 23-Jul-1998 09:11 1k -------------------------------------------------------------------- Butterthlies Inc, Hopeful City, Nevada 99999
(This output is from Apache 1.3; the year is displayed in four-digit format to cope with the Year 2000 problem.) How does all this work? As you can see from the httpd.conf file, this smart formatting is displayed directory by directory. The key directive is IndexOptions.
7.1.1. IndexOptions
IndexOptions option option
Get Apache: The Definitive Guide, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.