1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

Changing index file priority order?

Discussion in 'Plesk for Linux - 8.x and Older' started by NightMan, Jun 17, 2005.

  1. NightMan

    NightMan Guest

    0
     
    I have changed the file list in the httpd.conf as follows:

    DirectoryIndex at_domains_index.html index.html index.htm index.php index.php3 index.html.var index.shtml index.cfm

    But apache still load the index.php instead index.html after the restart.

    Both files are existing in the httpfolders.

    I am looking for a serverwide solution. not a .htaccess solution. (I know it can solve this)
     
  2. worker

    worker Guest

    0
     
    Which httpd.conf?
    If this is for a virtual domain, you should be using a vhost.conf.
    If this is in the main httpd.conf, local values in the virtual domains httpd.conf files will override that one.
     
  3. NightMan

    NightMan Guest

    0
     
    the main httpd.conf
     
  4. rspurlock

    rspurlock Guest

    0
     
    Was there ever a solution?

    I'm having the same exact problem here. I noticed it some time ago but now I have a customer who wants a starting index.html file and from there it can go to an applications index.php file. Problem it since they are both in the root folder, it always loads the index.php file, even though index.html is the first listed in the DirectoryIndex directive in the main server apache conf file. Does anyone know why the server does this?

    TIA,

    Rob
    LNHosting
     
  5. jamesyeeoc

    jamesyeeoc Guest

    0
     
    As to 'a solution', the easiest would be to rename the .php to something like index2.php. I have not seen any other posts either here on the Plesk forums or other support forums which offer other alternatives.

    All the posts I have seen are related to Apache 2.x

    Testing has shown it is not related to order of the DirectoryIndex list items, nor related to Multiviews. Per the Apache 2.x docs it 'should' be based on the list order, but that has not worked for many of those who have tried...

    Per Apache 2.x docs:
    This has made no difference to many people's servers.
     
  6. NightMan

    NightMan Guest

    0
     
    I am not sure, the .htaccess solution will overrule the httpd.conf.

    but worth to try!
     
  7. rspurlock

    rspurlock Guest

    0
     
    glad to know I'm not crazy

    i had read the same things about priority etc so I'm glad I'm not the only with the problem.

    Can anyone offer a .htaccess solution for this? There is already a .htaccess in the root (for Mambo search engine friendly control). Any help is appreciated as .htaccess is not one of my strong points and I've done very little of it.

    TIA,

    Rob
    LNHosting
     
  8. NightMan

    NightMan Guest

    0
     
    Change Default Homepage
    The DirectoryIndex directive allows you to specify which file is to be loaded as your default page whenever someone requests your Homepage. To change your default page, simply place the following in an htaccess file:

    DirectoryIndex filename.html

    The filename.html will now be loaded as your default page. You can specify DirectoryIndex pages for any directory in your site.
     
  9. Spyder

    Spyder Regular Pleskian

    25
    40%
    Joined:
    Jan 13, 2003
    Messages:
    155
    Likes Received:
    0
    Hi Guys.

    I have some entries in conf files and maybe help ..

    for this example I will use my test platform (FreeBsd 4.9 + Plesk 7.5.4 + Sitebuilder)

    in /usr/local/psa/apache/conf I have de default http.conf with:

    <IfModule mod_dir.c>
    DirectoryIndex at_domains_index.html index.html index.htm index.php index.ph
    p4 index.php3 index.shtml index.cfm
    </IfModule>

    and the last statment is:

    Include /usr/local/psa/apache/conf/sitebuilder.conf

    to load the specific parameters to SiteBuilder..

    Where I vave (and tested now this):

    DirectoryIndex index.html index.php

    If I move the index.html to index.htm the apache start do deliver the default index.php If I return the index.htm to index.html it delivery contents from this file..

    the apache version in default install form plesk in FreeBSD is 1.3.33 and it works.

    Tia.
     
  10. rspurlock

    rspurlock Guest

    0
     
    thanks!

    Just adding a .htaccess with the DirectoryIndex directive worked like a charm.

    Thanks a bunch!

    Rob
     
  11. Spyder

    Spyder Regular Pleskian

    25
    40%
    Joined:
    Jan 13, 2003
    Messages:
    155
    Likes Received:
    0
    Probably the http.conf is the best in this case :)

    .htacess is per directory base.
     
  12. NightMan

    NightMan Guest

    0
     
    httpd.conf is a server wide solution, at the same time htaccess will work for individueal directories.

    use the option as depends on your need.

    not sure it is possible with vhost.conf ...
     
Loading...