Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Aug 2008
    Posts
    73

    Default Diable files listing in a directory.

    Whenever a new domain is created, each one has access to its list of files if index file is not created there.

    For example if a directory domain.com/home has four files

    xzy.php
    none.php
    hello.php
    sample.php

    When one goes to domain.com/home all of those files show up. How do I disable that for all of the hosts?

  2. #2
    Member
    Join Date
    Aug 2009
    Posts
    15

    Default

    One option is to create / edit your .htaccess file under the .../public_html folder and add the following line:

    Code:
    Options All -Indexes
    This will apply it to ALL subfolders under ..../public_html

    Would be nice to have cPanel enable this by default

  3. #3
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,768
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    1. Login to WHM as root
    2. Click Apache Configuration
    3. Click Global Configuration
    4. Uncheck the box labeled Indexec in the [b]Directory '/' Options[/i]
    5. Click Save
    6. Click 'Rebuild Configuration and Restart Apache'
    7. Wait for restart
    8. Directory indexing is now disabled globally.
    Kenneth
    Product Development
    cPanel, Inc.

  4. #4
    Member
    Join Date
    Aug 2008
    Posts
    73

    Default

    Quote Originally Posted by cpanelkenneth View Post
    1. Login to WHM as root
    2. Click Apache Configuration
    3. Click Global Configuration
    4. Uncheck the box labeled Indexec in the [b]Directory '/' Options[/i]
    5. Click Save
    6. Click 'Rebuild Configuration and Restart Apache'
    7. Wait for restart
    8. Directory indexing is now disabled globally.

    Awesome! That's exactly what I needed.

Similar Threads & Tags
Similar threads

  1. Directory Listing
    By Mini in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-04-2010, 11:49 AM
  2. File Directory Listing
    By thomamon in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-04-2009, 03:39 PM
  3. Directory Listing - Show Date/Time of Files
    By DataMass in forum New User Questions
    Replies: 4
    Last Post: 05-04-2009, 11:05 AM
  4. no directory listing
    By tucman in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 04-04-2007, 01:56 AM
  5. /etc directory listing
    By zxcvbnm in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-02-2004, 09:12 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube