Operating System & Version
CentOS 7
cPanel & WHM Version
WHM 84.0.14

24x7server

Well-Known Member
Apr 17, 2013
1,911
99
78
India
cPanel Access Level
Root Administrator
Twitter
Please refer to the below steps to disable the directory listing globally in WHM:

1) Login to WHM.
2) In the search box type the Apache Configuration.
3) Click on Apache configuration.
4) Then click on the Global Configuration.
5) Untick Indexes option which is present under “Directory ‘/’ Options”.
6) Click on the Save button.
7) After that Rebuild Apache conf.
 
  • Like
Reactions: frankbret

keat63

Well-Known Member
Nov 20, 2014
1,959
266
113
cPanel Access Level
Root Administrator
Could you guys explain what this function achieves please.
Would this have any impicationts on web site functionality and google indexing etc.
 

timesurfer

Well-Known Member
Apr 16, 2019
67
13
8
Portugal
cPanel Access Level
Root Administrator
Please refer to the below steps to disable the directory listing globally in WHM:

1) Login to WHM.
2) In the search box type the Apache Configuration.
3) Click on Apache configuration.
4) Then click on the Global Configuration.
5) Untick Indexes option which is present under “Directory ‘/’ Options”.
6) Click on the Save button.
7) After that Rebuild Apache conf.
Thank you, 24x7!
 

timesurfer

Well-Known Member
Apr 16, 2019
67
13
8
Portugal
cPanel Access Level
Root Administrator
Could you guys explain what this function achieves please.
Would this have any impicationts on web site functionality and google indexing etc.
"Why You Need to Disable Directory Browsing in WordPress

Directory browsing can be used by hackers to find out if you have any files with known vulnerabilities, so they can take advantage of these files to gain access.
For the comprehensive security of our sites, we use Sucuri for WordPress security.
They have a simple dashboard which allows us to do this and perform many other WordPress security strengthening steps with in few clicks.

Directory browsing can also be used by other people to look into your files, copy images, find out your directory structure, and other information.
This is why it is highly recommended that you turn off directory indexing and browsing."

For more details, search the internet about: disable directory listing. And you should be presented by some articles that will provide you with the information you need.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,274
1,285
313
Houston
Thanks

Iv'e disabled indexing at apache level.
If it's so important, why is the default set to ON.
This is a result of it being the default for Apache2
 
  • Like
Reactions: keat63

keat63

Well-Known Member
Nov 20, 2014
1,959
266
113
cPanel Access Level
Root Administrator
I assume that as a security feature it's not a bad idea to apply this.
Having said that, I've had WHM for about 5 years now (maybe even 6), and only just applied this change.

Better late than never I suppose.
 

actihost

Member
Apr 9, 2020
10
1
3
Ecuador
cPanel Access Level
Root Administrator
Hello, so does disable WHM Apache directory indexing is recommended? I understand that is the default apache setting but there is no "Recommended" flag in WHM like so many options in tweak settings / exim.
BTW: looking to the Process Manager I do notice some wasted system resources on accounts with empty public_html folders i believe because of bots, etc. Disabling apache indexing can avoid that to right?
 
Last edited:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
10,944
1,723
363
cPanel Access Level
Root Administrator
No matter which option you choose, the files are still accessible on the web. The directory listing just allows a user to see a list of files if there is no index page in that directory. Some admins don't like that happening.