Directory Indexing Off by default on new accounts

ckizer

Well-Known Member
Aug 12, 2001
127
0
316
How can I turn Directory Indexing Off by default on new accounts I create?
 

cguimont

Well-Known Member
Jul 13, 2004
100
0
166
I think you would need a Script to do it, that runs when an account is created that excludes the directory from being indexed.

Other wise, you could simplily exclude your users directory( in my case: /home)
 

ckizer

Well-Known Member
Aug 12, 2001
127
0
316
couldn't i just make a .htaccess part of the skelton directory or does cpanel create a .htaccess when the account is made?

It seems stupid to me that directory indexing would be on by default on new accounts created, even if there is an index file..
 
May 14, 2003
5
0
151
Edit the access.conf file and restart apache. The existing and all new will then have directory indexing disabled by default:

vi /usr/local/apache/conf/access.conf

add a - in front of Indexes:

Options -Indexes

save the file

restart apache:

service httpd restart
 

ntwaddel

Well-Known Member
Nov 3, 2003
173
0
166
Templeton, CA
If you do -Indexes it turns off indexing, but in the index manager if you do "Default System Setting", which would be no indexes in this case. It sets Options All in the .htaccess which reenables the indexes. Is there anyway to modify this?
 
Last edited: