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 Indexing Off by default on new accounts

Discussion in 'General Discussion' started by ckizer, Sep 8, 2004.

  1. ckizer

    ckizer Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    129
    Likes Received:
    0
    Trophy Points:
    16
    How can I turn Directory Indexing Off by default on new accounts I create?
     
  2. cguimont

    cguimont Well-Known Member

    Joined:
    Jul 13, 2004
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    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)
     
  3. ckizer

    ckizer Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    129
    Likes Received:
    0
    Trophy Points:
    16
    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..
     
  4. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Put a .htaccess file in your cpanel3_skel/public_html directory and it will be copied to the new account. :)

    Cpanel does not create one by default.
     
  5. theunknownhost

    Joined:
    May 14, 2003
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  6. ntwaddel

    ntwaddel Well-Known Member

    Joined:
    Nov 3, 2003
    Messages:
    173
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    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?
     
    #6 ntwaddel, Dec 1, 2005
    Last edited: Dec 1, 2005
Loading...

Share This Page