Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/findsolu/public_html/qa-include/qa-db.php on line 66
Disable directory indexes server wide via WHM - FindSol.com
  • Register
Welcome to FindSol.com, where you can find Solutions of your problems, ask questions and receive answers from other community members.

Disable directory indexes server wide via WHM

+1 vote
184 views
Apache's DirectoryIndexes value is turned on server wide by default. This allows the files in a folder to be viewed via a directory index when there is no index file present in that directory for all sites hosted on server. A big security and privacy issue for content in directories. How we can hide content listing easily in WHM?
asked Jul 7, 2014 by papu

1 Answer

+1 vote
 
Best answer

You can disable Apache's DirectoryIndex setting server wide on your server by following steps. This can help increase security by ensuring a directory that doesn't include an index file isn't exposing any other possibly sensitive files.

  1. Log into WHM as root / super user
  2. In the top-left Find box enter in Apache, then click on Apache Configuration.
    whm-click-on-apache-configuration
  3. Click on Global Configuration.
    whm-click-on-apache-global-configuration
  4. Scroll down to the Directory "/" Options section, then un-check Indexes.
    whm-un-check-apache-indexes
  5. Scroll down to the bottom of the page and click on Save.
  6. Finally click on Rebuild Configuration and Restart Apache, Apache can take up to a few minutes to rebuild and during this time your websites won't respond to requests.
    whm-click-on-rebuild-configuration
  7. You should see that Apache was successfully restarted now.
    whm-apache-successfully-restarted
  8. 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.
    directory-listing-on-example
  9. directory-listing-off-example

 

answered Jul 7, 2014 by admin
selected Jul 7, 2014 by papu
...