Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

Disable server wide directory listing on WHM/cPanel

On a newly installed WHM/cPanel server if you access a folder inside a domain which doesn’t have a index page in it, the server will throw you the complete directly structure. This can be bad as this exposes information about your website structure which can help hackers.

To disable this server wide, open WHM and search for Apache Configuration. 

WHM list apache configuration

Then click Global Configuration, 

WHM apache global configuration

Scroll down to the Directory “/” Options and uncheck Indexes and click Save. 

whm apache global configuration disable indexes

On the next page click Rebuild Configuration and Restart Apache.

apache configuration rebuild configuration