Apache – Turn On/Off Directory Listing

If a client requests a URL that designates a directory and the directory does not contain a filename that matches the DirectoryIndex directive, then mod_autoindex can be configured to present a listing of the directory contents.

Turn on directory listing

To turn on automatic directory indexing, find the Options directive that applies to the directory and add the Indexes keyword.

For example:

<Directory /path/to/directory>
    Options +Indexes
</Directory>

To turn off automatic directory indexing, remove the Indexes keyword from the appropriate Options line. To turn off directory listing for a particular subdirectory, you can use Options -Indexes.

Turn off directory listing

For example:

<Directory /path/to/directory>
    Options -Indexes
</Directory>

Discuss your project
with our experts

No obligation. Limited slots.

Contact Form Business Enquiry

"*" indicates required fields

Please attach any RFP, project specification, or document that you would like to share.
Drop files here or
Max. file size: 5 GB.
    This field is for validation purposes and should be left unchanged.