hi is it possible to turn of directory browsing in cpanel. If so, how do you do it?
Thanks,
hi is it possible to turn of directory browsing in cpanel. If so, how do you do it?
Thanks,
On a case by case basis, the cPanel feature "Index Manager" will work just fine. If you want to disable it server wide, run this command in SSH :
Code:replace Indexes -Indexes -- /usr/local/apache/conf/access.conf
Another way to do this, without touching your .conf files is to create a .htaccess file in the /home directory..
vi /home/.htaccess
Inside that file, paste the following.
Options -Indexes
This will cause directory indexing to be off by default in all sub-directories of /home
Ex.
/home/username1/www
/home/username2/www
/home/username2/www/images
If a client has a directory they want to allow directory browsing in, they can then place a .htaccess file in their directory that has the following in it.
Options +Indexes
This will affect only the directory with the .htaccess file that has +Indexes in it. The default of OFF for indexing will remain for all other directories.