Admin interface do not works anymore after ispconfig 3.15 upgrade

Discussion in 'ISPConfig 3 Priority Support' started by christian.perego, Nov 13, 2020.

  1. christian.perego

    christian.perego Member HowtoForge Supporter

    Hi to all,
    I upgraded from ispconfig 3.11 to 3.15 and when I terminated the admin interface stop working. In the apache log I found this messages:

    [fcgid:warn] [pid 1108] (104)Connection reset by peer: [client 10.1.28.228:56862] mod_fcgid: error reading data from FastCGI server
    [core:error] [pid 1108] [client 10.1.28.228:56862] End of script output before headers: index.php

    In my ispconfig-vhost config file I have this section:

    <IfModule mod_fcgid.c>
    DocumentRoot /var/www/ispconfig/
    SuexecUserGroup ispconfig ispconfig
    <Directory /var/www/ispconfig/>
    Options -Indexes +FollowSymLinks +MultiViews +ExecCGI
    AllowOverride AuthConfig Indexes Limit Options FileInfo
    <FilesMatch "\.php$">
    SetHandler fcgid-script
    </FilesMatch>
    FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
    Require all granted
    </Directory>
    IPCCommTimeout 7200
    MaxRequestLen 15728640
    </IfModule>

    I do not know how to poceed to fix it. does anyone can help me?
    Execept the ispconfig admin interface seems that everything works fine on the server.
     
    Last edited: Nov 13, 2020
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    What's your OS and PHP version?

    Why not upgrade to 3.2?
     
  3. christian.perego

    christian.perego Member HowtoForge Supporter

    The SO is Debian 9 and I only run the update script from root, I do not know which version has been installed. But I remenber that the admin interface suggested me 3.15.
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    You can get the version with
    Code:
    php -v
     
  5. christian.perego

    christian.perego Member HowtoForge Supporter

    Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.33-0+deb9u8, Copyright (c) 1999-2017, by Zend Technologies
     
  6. christian.perego

    christian.perego Member HowtoForge Supporter

    Just to understand. During the update process IspConfig asks if you want to do a Backup. In this backup is there the ispconfig apache config? If yes where can I find it?
     
  7. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  8. christian.perego

    christian.perego Member HowtoForge Supporter

    No, didn't work for me, so I decided to upgrade PHP. Now I have PHP 7.4 installed and working: phpmyadmin works, roundcube works. The ispconfig is at the 3.2 version but the isp config interface do not works. I think that the problem is only a bad 000.ispconfig.vhost config file. Could you please copy here a standard version? How it should be for a debian 9, apache 2.4 and php7.4. Thanks a lot if anyone can help me.
     
  9. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    This is from a Debian 10 test system:
    Code:
    ######################################################
    # This virtual host contains the configuration
    # for the ISPConfig controlpanel
    ######################################################
    
     Listen 8080
    NameVirtualHost *:8080
    
    <VirtualHost _default_:8080>
      ServerAdmin webmaster@localhost
    
      Alias /mail /var/www/ispconfig/mail
    
      <Directory /var/www/ispconfig/>
        <FilesMatch "\.ph(p3?|tml)$">
          SetHandler None
        </FilesMatch>
      </Directory>
      <Directory /usr/local/ispconfig/interface/web/>
        <FilesMatch "\.ph(p3?|tml)$">
          SetHandler None
        </FilesMatch>
      </Directory>
    
      <IfModule mod_fcgid.c>
        DocumentRoot /var/www/ispconfig/
        SuexecUserGroup ispconfig ispconfig
        <Directory /var/www/ispconfig/>
          Options -Indexes +FollowSymLinks +MultiViews +ExecCGI
          AllowOverride AuthConfig Indexes Limit Options FileInfo
          <FilesMatch "\.php$">
            SetHandler fcgid-script
          </FilesMatch>
          FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
                Require all granted
              </Directory>
        IPCCommTimeout  7200
        MaxRequestLen 15728640
      </IfModule>
    
      <IfModule mpm_itk_module>
        DocumentRoot /usr/local/ispconfig/interface/web/
        AssignUserId ispconfig ispconfig
        AddType application/x-httpd-php .php
        <Directory /usr/local/ispconfig/interface/web>
          # php_admin_value open_basedir "/usr/local/ispconfig/interface:/usr/share:/tmp"
          Options +FollowSymLinks
          AllowOverride None
                Require all granted
                php_value magic_quotes_gpc        0
        </Directory>
      </IfModule>
    
      # ErrorLog /var/log/apache2/error.log
      # CustomLog /var/log/apache2/access.log combined
      ServerSignature Off
    
      <IfModule mod_security2.c>
        SecRuleEngine Off
      </IfModule>
    
      # SSL Configuration
      SSLEngine On
        SSLProtocol All -SSLv3 -TLSv1 -TLSv1.1
        SSLCertificateFile /usr/local/ispconfig/interface/ssl/ispserver.crt
      SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key
      #SSLCACertificateFile /usr/local/ispconfig/interface/ssl/ispserver.bundle
    
      SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
      SSLHonorCipherOrder On
       
      <IfModule mod_headers.c>
        # ISPConfig 3.1 currently requires unsafe-line for both scripts and styles, as well as unsafe-eval
        Header set Content-Security-Policy "default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' data:; object-src 'none'"
        Header set Content-Security-Policy "default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' data:; object-src 'none'; upgrade-insecure-requests"
        Header set X-Content-Type-Options: nosniff
        Header set X-Frame-Options: SAMEORIGIN
        Header set X-XSS-Protection: "1; mode=block"
        Header always edit Set-Cookie (.*) "$1; HTTPOnly"
        Header always edit Set-Cookie (.*) "$1; Secure"
        <IfVersion >= 2.4.7>
            Header setifempty Strict-Transport-Security "max-age=15768000"
        </IfVersion>
        <IfVersion < 2.4.7>
            Header set Strict-Transport-Security "max-age=15768000"
        </IfVersion>
        RequestHeader unset Proxy early
      </IfModule>
    
        SSLUseStapling On
      SSLStaplingResponderTimeout 5
      SSLStaplingReturnResponderErrors Off
      </VirtualHost>
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    The error in your first post is from PHP and not apache, so it's not very likely that you have an issue with the apache config. Check the global apache error.log file to see which error you get there when you open the ispconfig UI in the browser.
     
    Th0m likes this.
  11. christian.perego

    christian.perego Member HowtoForge Supporter

    Thanks to all,
    Till I do not have any error in the /var/log/apache2/error.log file. When I connecto to the ISPCONFIG interface I see the PHP code like if the fast CGI or I do not know what is not workin. But everything on the server works correctly. Roundcube, phpmyadmin.... So I do not think that is a PHP config problem. I think that is something regarding the fast CGI ISPCONFIG VHOST config. But I can't find where is the error.
    This is what I see when I connect to the ISPCONFIG login page:

    uses('tpl'); $app->tpl->newTemplate('main.tpl.htm'); $app->tpl->setVar('startpage', isset($_SESSION['s']['module']['startpage']) ? $_SESSION['s']['module']['startpage'] : '', true); $app->tpl->setVar('logged_in', ($_SESSION['s']['user']['active'] != 1 ? 'n' : 'y')); // tab change warning? // read misc config $app->uses('getconf'); $sys_config = $app->getconf->get_global_config('misc'); if($sys_config['tab_change_warning'] == 'y') { $app->tpl->setVar('tabchange_warning_enabled', 'y'); $app->tpl->setVar('global_tabchange_warning_txt', $app->lng('global_tabchange_warning_txt')); } else { $app->tpl->setVar('tabchange_warning_enabled', 'n'); } $app->tpl->setVar('tabchange_discard_enabled', $sys_config['tab_change_discard']); if($sys_config['tab_change_discard'] == 'y') { $app->tpl->setVar('global_tabchange_discard_txt', $app->lng('global_tabchange_discard_txt')); } if($sys_config['use_loadindicator'] == 'y') { $app->tpl->setVar('use_loadindicator', 'y'); } if($sys_config['use_combobox'] == 'y') { $app->tpl->setVar('use_combobox', 'y'); } if(isset($_SESSION['show_info_msg'])) { $app->tpl->setVar('show_info_msg', $_SESSION['show_info_msg']); unset($_SESSION['show_info_msg']); } if(isset($_SESSION['show_error_msg'])) { $app->tpl->setVar('show_error_msg', $_SESSION['show_error_msg']);................................................................................

    Thanks a lot for your help.
    Kris
    PS while I have the admin site down I need just to enlarge one mail space that is nerly out of space. Is possible to do it without the ISPCONFIG interface? For instance managing the database is anyway? Thanks a lot.
     
  12. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Did you install the correct PHP version and is it up and running?
     
  13. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    7.4 is the wrong system php version for Debian 9; your can install multiple versions, but set the default to what it should be (might be 5.6 or 7.0, I don't remember). Then go through the perfect server guide for Debian 9 and ensure you have all php modules and other packages installed, then install the 3.2.1 update and reconfigure services. The update will tell you if you have any conf-custom templates, and if so either update yours to current versions or let it rename them.
     
  14. christian.perego

    christian.perego Member HowtoForge Supporter

    Thanks Jesse, I switched the default PHP version to 7.0 that is the default version for debian 9 and I verified that all php modules and other packages are installed. How could I reinstall ISPCONFIG without lose anything? It is a production server. Do I risk to loose the mail config, web config, roundcube and so on? Don't you think that an upgrade is better then install?
     
  15. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    The panel should be working now. If not, try doing a force update and reconfigure services with
    Code:
    ispconfig_update.sh --force
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Jesse did not say to reinstall ISPConfig, he said that you shall go through the perfect server and install the missing php and apache packages. A reinstall of ISPConfig is not necessary.
     
  17. christian.perego

    christian.perego Member HowtoForge Supporter

    You are right Till. I just run the update as Th0m wrote:
    ispconfig_update.sh --force
    and followind the instruction at his page: https://www.howtoforge.com/updating-ispconfig-3-1-to-ispconfig-3-2/

    After that I returned to my initial problem. In the apache2 error.log I find:
    [fcgid:warn] [pid 32396] (104)Connection reset by peer: [client 10.1.28.228:47992] mod_fcgid: error reading data from FastCGI server
    [core:error] [pid 32396] [client 10.1.28.228:47992] End of script output before headers: index.php

    It is clear that is a FastCGI problem that I can't understand. But I ask you here because the interfare stop working just after the ispconfig upgrade. Before that upgrade it worked well.
     
  18. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Did you set the correct defaults for PHP?
    Code:
    update-alternatives --config php
    update-alternatives --config php-cgi
     
  19. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Did you run the command to enable apache modules in the perfect server guide?

    What are the current ispconfig .conf and .vhost files in sites-enabled? Also what is in /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter? Look from errors from the php process in /var/log files.
     
  20. christian.perego

    christian.perego Member HowtoForge Supporter

    Hi Th0m, the php-cgi was configurated on the wrong php version (7.4). I changed it to the right one (7.0). Now both of them are right. I restarted the apache server but the ispconfig control panel is still offline with the same error.

    To solve my immediate problem (one full mailbox), I changed the quote value for the mailbox directly in the database, and it worked fine.
    Now I have time to work on it without customer pressing :)
     

Share This Page