Directory indexing, also known as directory listing, is a feature in the Apache HTTP Server that allows users to view the contents of a directory when there is no default webpage available. When enabled, if a user accesses a directory on a web server that does not have an index file (such as index.html or index.php), Apache will generate a listing of the files and subdirectories within that directory. This listing typically includes the file names, sizes, modification dates, and sometimes additional information.
While directory indexing can be useful for navigating directories and accessing files, it can also pose security risks by revealing sensitive information. Therefore, it is important to carefully configure and manage directory indexing in Apache to ensure proper security measures are in place.
This guide explains how to disable default directory indexing server-wide.
Disable Directory Indexing
IMPORTANT: This solution will require root access. If this needs to be obtained, follow the guide on requesting root access.
NOTE: Once disabled, Options +Indexes
can be added to local .htaccess files to allow that specific directory to allow indexing again.
- Log into Root WHM
- Navigate to Apache Configuration, located in the Service Configuration section
- Click on Global Configuration
- In the Directory "/" Options area, uncheck Indexes
- Scroll down and click on Save
- Click Rebuild Configuration and Restart Apache to make the changes take effect
Comments
0 comments
Article is closed for comments.