DirectoryIndex set priority .html .php

Discussion in 'General' started by Brenton, Feb 7, 2007.

  1. Brenton

    Brenton New Member

    Hi

    Not sure how to do this on my ISPConfig server.

    I want index.html to be loaded first. I have a index.html (a holding page) and index.php (the Joomla CMS) and while I'm working on the site I want web users to see the index.html and only the client to see index.php, by explicitly typing it in as part of the URL.

    I can do it on my local internal dev server, but not on my public ISPconfig server.

    Please help.
    Brenton
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Please go to the Options tab of that web site in ISPConfig. There you have a textarea with index files. Just place index.html before index.php there (but that should be the default setting).
     
  3. Brenton

    Brenton New Member

    Hi Falko

    I've had a look there and the order of the list is:
    index.html
    index.htm
    index.php
    index.php5
    etc.

    But the .php is still loading before the .html.

    the site is http://www.sabcoha.org/ and the index.html can be seen if you type http://www.sabcoha.org/index.html

    It's a strange one that has me confused.

    Regards
    Brenton
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Have a look at the oder of the directory index directive in your apache2.conf file too.
     
  5. Brenton

    Brenton New Member

    Hi till

    Thanks for your reply.

    I've checked that too.

    The /etc/apache2/apache2.conf file reads
    Code:
    DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 index.pl index.xhtml
    I'm at a loss with this.

    Regards
    Brenton
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe you have more then one apache server installed. Please check with:

    netstat -tap

    if really a apache2 and not a apache1 is listening on port 81. Have you tried to restart your whole server to kill processes that might run with an old configuration?
     
  7. Brenton

    Brenton New Member

    Fixed

    Hi till and Falko

    I've just decided to have a look at the .htaccess file and found that it read:
    DirectoryIndex index.php

    Sorry for wasting your time, I should have checked this first.

    Regards
    Brenton
     
  8. blocker

    blocker Member

    is there a way to fix the directory index priority for all the sites at once? for example i want to have index.php as highest prority
     
  9. falko

    falko Super Moderator ISPConfig Developer

    No, this is only possible on a per-site basis.
     
  10. blocker

    blocker Member

    what about:

    Code:
    update isp_isp_web set  optionen_directory_index="index.htm
    \nindex.html\nindex.php........................"
     
  11. falko

    falko Super Moderator ISPConfig Developer

    Try
    Code:
    update isp_isp_web set  optionen_directory_index="index.htm
    \nindex.html\nindex.php........................", status="u";
    Then run
    Code:
    touch /home/admispconfig/ispconfig/.run
    to inform the backend.
     

Share This Page