MilesWeb Hosting Forum

Web Hosting Technical Support => How To's => Topic started by: Administrator on January 15, 2014, 10:54:24 PM

Title: How To Disable Directory Indexes Server Wide ?
Post by: Administrator on January 15, 2014, 10:54:24 PM
Dear Members,

DirectoryIndexes allows the files in a folder to be viewed via a directory index when there is no index file present in that directory. By default Apache's DirectoryIndexes value is turned on server wide.

It is always recommended to disable it on the server for security reasons. PCI scan fails if DirectoryIndexes is set to On on the server. This thread will walk you through disabling DirectoryIndexes on the server. If you wish to disable it, you will require root access of the server.

1. Please login to your server via WHM & access option Home » Service Configuration » Apache Configuration.
2. Under Apache Configuration, access Global Configuration.
3. Find for Directory "/" Options & in front of it you will see multiple check boxes.
4. Uncheck the Indexes & click on Save.
5. Finally click on Rebuild Configuration and Restart Apache & it will show apache being restarted successfully.
6. Now when you try to browse to a directory that doesn't have an index file, you'll receive an error instead of a directory listing.

It helps in increasing security by ensuring a directory that doesn't include any index file isn't exposing any other possibly sensitive files.