How to disable directory index for a whole server?
In dedicated servers which is provided by Silicon house , you can able to customize and tweak the settings as per your requirements of the server. By customizing the settings we can fix the issue permanently.
Directory Index :
——————–
* Directory index is the file which the server loads first and by default will be the index file within the document root of the domain. The server always loads the index file content when we visit the domain. The server gives priority for index.htm then index.html then after that index.php file. When accessing the site, a visitor will typically see the index page under your document root. If no index page exists, the browser will display a list (or index) of the files under the document root of the domain. As there is no index page present under your public_html, the site is showing directory listing.
* Note that if the directory index is disabled server wide inorder to enhance the server security settings.
Steps to disable the directoty index
——————————————-
1) Login to the WHM
2) Under service configurtion , select apache configuration.
3) Then click global configuration , in the Directory “/” Options , uncheck the “indexes” \
4) Then click Save
By this way, you can disable the directory index for a whole server.