← ServerPilot Docs

How to Enable Directory Indexes (a.k.a. Directory Listing)

Directory listing is a webserver feature where the webserver will automatically generate an HTML page that lists the files in a directory when there is no index.html or index.php file.

Enabling Directory Listing

Directory listing can be enabled through .htaccess files.

For example, to enable directory listing for the path /download, create the file:


with the contents:

Options +Indexes

Customizing the Appearance of Directory Listings

You can control how the directory listing appears by adding an IndexOptions directive. For example, the following will display the listing without file type icons and will also display file sizes and modification times.

Options +Indexes
IndexOptions FancyIndexing SuppressIcon

See the Apache IndexOptions documentation for more information on customizing directory listings.

Launch your first site in 5 minutes