The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Directory browsing

Discussion in 'General Discussion' started by logikstudios, Apr 15, 2007.

  1. logikstudios

    logikstudios Well-Known Member

    Joined:
    Nov 2, 2006
    Messages:
    158
    Likes Received:
    0
    Trophy Points:
    0
    hi is it possible to turn of directory browsing in cpanel. If so, how do you do it?

    Thanks,
     
  2. yapluka

    yapluka Well-Known Member

    Joined:
    Dec 24, 2003
    Messages:
    301
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    France
    cPanel Access Level:
    Root Administrator
    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
    
     
  3. bmcpanel

    bmcpanel Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    546
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
Loading...

Share This Page