Default index file

Discussion in 'ISPConfig 3 Priority Support' started by atle, Mar 12, 2021.

  1. atle

    atle Member HowtoForge Supporter

    I created a new web server today, with the auto-install script. No cert issues, hence I assume there is a new ispc version.
    When I create new websites on this new server, there is no index.html file in the web directory, rather a standard_index.html file.
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Yes, this is new behaviour since 3.2.3.

    In the old situation, you had to remove the index.html file to use a index.php file, or overwrite it with a different .html file. From now on, any index file (.htm, .html, .php, and probably one or two I am missing) will take precedence over the standard_index.html file. If none of those files exists, the standard_index.html is shown.

    This is described in the release notes: https://www.ispconfig.org/blog/ispconfig-3-2-3-released/
     
  3. atle

    atle Member HowtoForge Supporter

    hm, yes, but apache does not consider standard_index.html to be a index file for me.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please have a look into the Apache ispconfig.conf file, the DirectoryIndex is defined there and it should contain standard_index.html as index file.
     
  5. atle

    atle Member HowtoForge Supporter

    Nope.
    Code:
    mods-available/dir.conf:    DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
     
  6. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    What is the output of
    Code:
    cat /etc/apache2/sites-available/ispconfig.conf
     
  7. atle

    atle Member HowtoForge Supporter

    N.B, none of these have the setting
    Code:
    /etc/apache2/sites-available/ispconfig.conf
    /etc/apache2/sites-enabled/000-ispconfig.conf
     
  8. atle

    atle Member HowtoForge Supporter

    Code:
    root@www1:/etc/apache2# cat /etc/apache2/sites-available/ispconfig.conf
    ################################################
    # ISPConfig General Apache Options
    ################################################
    ServerTokens ProductOnly
    ServerSignature Off
    
    ################################################
    # ISPConfig Logfile configuration for vlogger
    ################################################
    
    SetEnvIf Request_URI "^/datalogstatus.php$" dontlog
    
    LogFormat "%v %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig
    CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig
    
    <Directory /var/www/clients>
        AllowOverride None
            Require all denied
        </Directory>
    
    # Do not allow access to the root file system of the server for security reasons
    <Directory />
        Options -Indexes
        AllowOverride None
            Require all denied
        </Directory>
    
    <Directory /var/www>
      Options -Indexes
    </Directory>
    
    <Directory /var/www/conf>
        AllowOverride None
            Require all denied
        </Directory>
    
    # Except of the following directories that contain website scripts
    <Directory /usr/share/phpmyadmin>
                    Require all granted
            </Directory>
    
    <Directory /usr/share/phpMyAdmin>
                    Require all granted
            </Directory>
    
    <Directory /srv/www/htdocs>
                    Require all granted
            </Directory>
    
    <Directory /usr/share/squirrelmail>
                    Require all granted
            </Directory>
    
    # Allow access to mailman on OpenSuSE
    <Directory /usr/lib/mailman/cgi-bin>
                    Require all granted
            </Directory>
    
    <Directory /usr/lib/mailman/icons>
                    Require all granted
            </Directory>
    
    <Directory /var/lib/mailman/archives/>
            Options +FollowSymLinks
                    Require all granted
            </Directory>
    
    # allow path to awstats and alias for awstats icons
    <Directory /usr/share/awstats>
                    Require all granted
            </Directory>
    
    Alias /awstats-icon "/usr/share/awstats/icon"
    
    
    <IfModule mod_ssl.c>
      SSLStaplingCache shmcb:/var/run/ocsp(128000)
    </IfModule>
    
    <Directory /var/www/php-cgi-scripts>
      AllowOverride None
        Require all denied
      </Directory>
    
    <Directory /var/www/php-fcgi-scripts>
      AllowOverride None
        Require all denied
      </Directory>
     
  9. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Which OS are you using?
     
  10. atle

    atle Member HowtoForge Supporter

    Debian 10
     
  11. atle

    atle Member HowtoForge Supporter

    N.B, the server is www slave server. The master has not been updated to 3.2.3
     
  12. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Till has found the problem. The template when installing is updated, but the file exists in the server/conf folder aswell.

    You can fix it for now by adding
    Code:
    DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm standard_index.html
    to the ispconfig.conf file, and to the server/conf/apache_ispconfig.conf.master file.

    Just a note by the way, master and slave should always be the same version as the database fields can be different.
     
    ahrasis likes this.
  13. atle

    atle Member HowtoForge Supporter

    ok, where? within a Directory or outside?
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Add it just at the top after "ServerSignature Off".
     
  15. atle

    atle Member HowtoForge Supporter

    Yes, that works.
     
  16. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    For any user finding this thread, this is the definitive info and workaround:
    This is a known bug in ISPConfig 3.2.3, which occurs after changing server config. It is fixed in the next release. You can use this as temporary work around:
    Code:
    wget -O /usr/local/ispconfig/server/conf/apache_ispconfig.conf.master https://git.ispconfig.org/ispconfig/ispconfig3/-/raw/3.2.3/install/tpl/apache_ispconfig.conf.master
    echo "DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm standard_index.html" >> /etc/apache2/sites-available/ispconfig.conf
    systemctl restart apache2
     
    ahrasis and till like this.

Share This Page