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.

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

    /scripts/rebuildhttpdconf

    Didn't fix it
     
  2. Secret Agent

    Secret Agent Guest

    Strange.

    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

    Joined:
    Dec 7, 2004
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    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 :

    Code:
    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

    Joined:
    Feb 25, 2005
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    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.jp index.php4 index.php3 index.php index.phtml index.htm default.htm default.html home.htm
    </IfModule>

    For server wide settings...
     
Loading...

Share This Page