Find the answer to your Linux question:
Results 1 to 7 of 7
Hello all, Can anyone tell me how to set the default page for a Redhat/Apache/Cpanel server? Meaning, I want index.* to be the default for web folders. So when I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2004
    Posts
    13

    Setting default page type


    Hello all,

    Can anyone tell me how to set the default page for a Redhat/Apache/Cpanel server? Meaning, I want index.* to be the default for web folders. So when I put in www.mydomain.com it will know to load index.htm.

    I know how to do it in Windows, but not Linux.

    Thanks!

  2. #2
    Just Joined! coolguy-in's Avatar
    Join Date
    Sep 2004
    Posts
    21

    Re: Setting default page type

    put you index.html page in /var/www/html (default set for preinstalled apache) directory.

    restart httpd....................... check your page with:

    http://localhost

    OR

    http://ip_address_of_machine

  3. #3
    Just Joined!
    Join Date
    Dec 2004
    Posts
    13
    But what if I want the default to be index.php, or mypage.htm, etc. Is there a file I can edit to add default page types?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie rat007's Avatar
    Join Date
    Jul 2004
    Location
    Brno
    Posts
    230
    Than you need to look for httpd.conf file

  6. #5
    Just Joined!
    Join Date
    Dec 2004
    Posts
    13
    Thanks

  7. #6
    Just Joined!
    Join Date
    Mar 2004
    Posts
    21
    Quote Originally Posted by Steel Rat
    But what if I want the default to be index.php, or mypage.htm, etc. Is there a file I can edit to add default page types?
    Find DirectoryIndex in your httpd.conf file, and change/add what you would like to have as the Index page.

    Code:
    DirectoryIndex index.html index.txt default.php start.htm

  8. #7
    Just Joined!
    Join Date
    Dec 2004
    Posts
    13
    Even better.

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •