Indiana University

IU Webmaster

Directory Indexing Turned Off on Veritas

What is directory indexing?

Directory indexing is when a directory listing of files is displayed in place of an actual web page. This occurs when a URL resolves to a directory that does not contain a default file. The default files that the web servers currently look for are:

index.html  home.html  index.htm  home.htm  index.shtml  index.cgi  index.php3  index.phtml

To view an example of a directory index:

http://www.indiana.edu/~wmhome/test/

In the above example, since there is no index or home page in this directory, all the contents of the directory are listed. This feature is what is being disabled beginning on July 9th on www.indiana.edu and www.iun.edu.

What will happen if I don't have one of the above default files in my directory once directory indexing is disabled?

Visitors to your site will receive a 403-Forbidden error message. This makes it especially important that you place an index file in your home directory.

You can customize these error pages to provide more information about a problem or redirect web site visitors to another location or contact. For further information on how to do this, see Customizing Error Messages on Your Web Site.

How do I enable directory indexing for my account?

You need to create a file and save it as:

.htaccess

Additional information can be placed in the .htaccess file but to enable indexing you must have the following line:

Options    Indexes

If the directory or subdirectory for which you wish to enable indexing contains files that use server-side includes, cgi, or symlinks, you will need to add the following to the .htaccess file:

ExecCGI    [for cgi files]

IncludesNOEXEC    [for server-side includes]

SymLinksIfOwnerMatch    [for symlinks]

For example, if you wish to enable directory indexing, and the directory or subdirectories therein contain cgi files and files using server-side includes, you would place the following line in your .htaccess file:

Options    Indexes  ExecCGI  IncludesNOEXEC

The .htaccess file should be placed in the directory that you would like to have directory indexing enabled. It is recursive so any subdirectories therein will be enabled as well. For further information about .htaccess files, see Controlling Web Page Access.

Why is directory indexing being disabled?

The IT Security Office considers removing directory indexing from the web server a prudent action to remove the possibility of unauthorized users discovering information about the file system that isn't specifically needed.

If you have any questions about this, please contact IU Webmaster.