making index.php as default DirectoryIndex

Discussion in 'Installation/Configuration' started by clanx, Jun 25, 2009.

  1. clanx

    clanx New Member

    How do I set permanently the default DirectoryIndex is to index.php
    (ISP Site -> Options -> DirectoryIndex )

    I would like index.php on top of the rest :

    index.php
    index.html
    index.htm
    index.php5
    index.php4
    index.php3
    index.shtml
    index.cgi
    index.pl
    index.jsp
    Default.htm
    default.htm
     
  2. madmucho

    madmucho Member

    Edit template

    I thing you can edit vhost template file in ispconfig
    Code:
    /root/ispconfig/isp/conf/vhost.conf.master
    copy and edit to
    Code:
    /root/ispconfig/isp/conf/customized_teplate/vhost.conf.master
    in template you can see tag {DIRECTORYINDEX} just paste there you directory tag information. Then edit site in ispconfig and click save, apache vhost will be recreated with your template and changes.

    i dont know where variable {DIRECTORYINDEX} is filled but you can delete and put there you vhost directive.

    beware this changes will efect sites which dont have PHP JSP and others enabled!!
     
  3. clanx

    clanx New Member

    Hi madmucho,

    Thanks for the reply and suggestion.

    The workaround step you provides sounds workable but it will break the flexibility of the system.

    I wonder is there other way ?
     
  4. id10t

    id10t Member

    The DirectoryIndex directive can handle multiple file types - if the first isn't found, the next is tried, and so on.

    I've just tried grepping around in my /root/ispconfig and I can't find where it is actually set - I can see the function calls to work with it, but I can't find where it is defined.

    You can change it for an individual site by editing the site and looking at the "options" tab.
     
  5. madmucho

    madmucho Member

    Found

    Maibe this help
    Code:
    grep optionen_directory_index /home/admispconfig/ -R
    Code:
    /home/admispconfig/ispconfig/lib/classes/ispconfig_isp_web.lib.php:      $go_api->db->query("UPDATE isp_isp_web SET optionen_directory_index = 'index.html\r\nindex.htm\r\nindex.php\r\nindex.php5\r\nindex.php4\r\nindex.php3\r\nindex.shtml\r\nindex.cgi\r\nindex.pl\r\nindex.jsp\r\nDefault.htm\r\ndefault.htm' where doc_id = '$doc_id'");
    That is part of class which update directory index specification for web vhost file, .
    Here you can change default set of of option directory directive.
    Edit at you own risk.
     

Share This Page