Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

seeing index dir instead of site

Discussion in 'General Discussion' started by Secret Agent, Aug 1, 2005.

  1. Secret Agent

    Secret Agent Guest

    I'm not sure why but on a brand new centos 4 box I am seeing index directory of my public_html instead of the actual site.

    I simply uploaded one index.html test file and nothing else, still showing only public_html files.

    how do I correct this?

    I ran


    Didn't fix it
  2. Secret Agent

    Secret Agent Guest


    It worked when I renamed to index.php but when I switched back to .html it would not work.

    I even deleted the htacess file too, still didn't work.

    How do I get it to work for html / htm server wide again?
  3. abubin

    abubin Well-Known Member

    Dec 7, 2004
    Likes Received:
    Trophy Points:
    first, you need to turn off indexing on the root folder. Look for index manager in your cpanel.

    Then edit your .htaccess file for that account and add this :

    DirectoryIndex main.php index.html whatever_name_you_want.htm
    Note that the order of the filename in directoryindex reflects the order in which apache will pickup those files.

    Save, and you're good to go.
    #3 abubin, Aug 2, 2005
    Last edited: Aug 2, 2005
  4. nickb

    nickb Well-Known Member

    Feb 25, 2005
    Likes Received:
    Trophy Points:
    If you have mod_directory enabled then edit your httpd.conf and add following lines to it...

    <IfModule mod_dir.c>
    DirectoryIndex index.html index.wml index.cgi index.shtml index.jsp index.js index.php4 index.php3 index.php index.phtml index.htm default.htm default.html home.htm

    For server wide settings...
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice