How to Disable Directory Indexing in Apache via WHM Print

  • 4

 

How to Disable Directory Indexing in Apache via WHM

Directory indexing can be a security risk, as it allows users to list files inside a directory when no index file (e.g., index.html) is present. You can disable this option directly from WHM.

 

Steps to Disable the "Indexes" Option

  1. Log in to WHM with root privileges.
  2. In the top-left search bar, type "Apache Configuration" and click on Apache Configuration.
  3. Select Global Configuration.
  4. Scroll down to the section Directory ‘/’ Options.
  5. Uncheck the Indexes checkbox.
  6. Scroll down and click Save to apply the changes.
  7. WHM will prompt you to restart Apache: confirm to apply the new configuration.

 

Note

This change applies to the root directory and can be inherited by all subdirectories unless overridden by a custom directive in a .htaccess file.

 


Was this answer helpful?

« Back