Admin Website 500 after upgrade to Debian Bullseye

Discussion in 'Installation/Configuration' started by nuhnuh, Jan 2, 2022.

  1. nuhnuh

    nuhnuh New Member

    I recently upgrade a personal server to Debian Bullseye and everything had apparently gone smoothly.
    Although, trying to access the admin panel for ISPConfig3 is now displaying a 500 Internal Server Error. Everything else appears to still be working.

    This is the error being output by Apache2
    Code:
    [Sun Jan 02 11:17:28.940899 2022] [fcgid:warn] [pid 264988] (104)Connection reset by peer: [client ipaddress:35860] mod_fcgid: error reading data from FastCGI server
    [Sun Jan 02 11:17:28.940984 2022] [core:error] [pid 264988] [client ipaddress:35860] End of script output before headers: index.php
    After looking this error message up, one of the concerns was that permissions were improperly set for /var/www/ispconfig, so I tested to see if I could access the /robots.txt, and this works, and the permissions for the directory and its parents all seem okay to me.
    Code:
    /var/www> ls
    lrwxrwxrwx 1 root    root      34 Apr 29  2018 ispconfig -> /usr/local/ispconfig/interface/web
    drwxr-xr-x 9 root    root    4096 Sep  3  2020 php-fcgi-scripts
    
    /var/www/ispconfig> ls
    drwxr-s--- 6 ispconfig ispconfig  4096 Apr 29  2018 admin
    -rwxr-x--- 1 ispconfig ispconfig  3212 Jan  2 11:07 capp.php
    drwxr-s--- 6 ispconfig ispconfig  4096 Apr 29  2018 client
    -rwxr-x--- 1 ispconfig ispconfig  2970 Jan  2 11:07 content.php
    drwxr-s--- 7 ispconfig ispconfig  4096 Apr 29  2018 dashboard
    -rwxr-x--- 1 ispconfig ispconfig  1901 Jan  2 11:07 datalogstatus.php
    drwxr-s--- 6 ispconfig ispconfig  4096 Mar 17  2021 dns
    -rwxr-x--- 1 ispconfig ispconfig     0 Jan  2 11:07 dummy_login.html
    -rwxr-x--- 1 ispconfig ispconfig 18478 Sep 21  2020 favicon.ico
    drwxr-s--- 6 ispconfig ispconfig  4096 Apr 29  2018 help
    -rwxr-x--- 1 ispconfig ispconfig  4533 Jan  2 11:07 index.php
    drwxr-s--- 6 ispconfig ispconfig  4096 Sep 21  2020 js
    -rwxr-x--- 1 ispconfig ispconfig  1649 Jan  2 11:07 keepalive.php
    drwxr-s--- 4 ispconfig ispconfig  4096 Apr 29  2018 login
    drwxr-s--- 6 ispconfig ispconfig  4096 Sep 21  2020 mail
    drwxr-s--- 6 ispconfig ispconfig  4096 Apr 29  2018 mailuser
    drwxr-s--- 6 ispconfig ispconfig  4096 Sep 21  2020 monitor
    -rwxr-x--- 1 ispconfig ispconfig  5177 Jan  2 11:07 nav.php
    drwxr-s--- 2 ispconfig ispconfig  4096 Apr 29  2018 remote
    -rwxr-x--- 1 ispconfig ispconfig    26 Jan  2 11:07 robots.txt
    drwxr-s--- 7 ispconfig ispconfig  4096 Apr 29  2018 sites
    drwxr-s--- 3 ispconfig ispconfig  4096 Apr 29  2018 strengthmeter
    drwxrws--- 2 ispconfig ispconfig  4096 Apr 29  2018 temp
    drwxr-s--- 3 ispconfig ispconfig  4096 Apr 29  2018 themes
    drwxr-s--- 6 ispconfig ispconfig  4096 Apr 29  2018 tools
    drwxr-s--- 6 ispconfig ispconfig  4096 Apr 29  2018 vm
    
    /var/www/php-fcgi-scripts> ls
    drwxr-xr-x 2 ispconfig ispconfig 4096 Apr 29  2018 ispconfig
    
    /var/www/php-fcgi-scripts/ispconfig> ls
    -rwxr-xr-x 1 ispconfig ispconfig 300 Jan  2 11:07 .php-fcgi-starter

    So I thought I would try creating a new php file containing just <?php phpinfo(); ?> to see if that works, and that displays a 500 error.

    I have run: ispconfig_update.sh --force
    And everything completed without errors, services were reconfigured.
    I have also run:
    Code:
    #> update-alternatives --config php
    There is only one alternative in link group php (providing /usr/bin/php): /usr/bin/php7.4
    Nothing to configure.
    #> update-alternatives --config php-cgi
    update-alternatives: error: no alternatives for php-cgi

    I assume this is now down to a php/apache2 configuration error.
    Although, I have several domains hosted on the server configured by ISPConfig3 that are also using PHP, and they all work fine.
    These sites are all using mod_php in their vhost files, while the ISPConfig3 admin vhost file is using mod_fcgid.c

    I uninstalled libapache2-mod-fcgid, purged, reinstalled, and then reran ispconfig_update.sh --force
    Still, the same 500 error persists, and I have reached the limit of what I know.
    Can anyone help shed some light on what could be the problem?
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Can you check the suexec.log?
     
  3. nuhnuh

    nuhnuh New Member

    I forgot to include it, sorry. But nothing seemed abnormal there either:

    Code:
     #> cat /var/log/apache2/suexec.log  
    [2022-01-02 10:27:40]: uid: (5003/ispconfig) gid: (5004/ispconfig) cmd: .php-fcgi-starter
    [2022-01-02 10:28:05]: uid: (5003/ispconfig) gid: (5004/ispconfig) cmd: .php-fcgi-starter
    [2022-01-02 10:29:14]: uid: (5003/ispconfig) gid: (5004/ispconfig) cmd: .php-fcgi-starter
    [2022-01-02 11:07:28]: uid: (5003/ispconfig) gid: (5004/ispconfig) cmd: .php-fcgi-starter
    [2022-01-02 11:17:28]: uid: (5003/ispconfig) gid: (5004/ispconfig) cmd: .php-fcgi-starter
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  5. nuhnuh

    nuhnuh New Member

    I've ran the script, and the unedited output is below.

    Please note, I chose a non-standard port for the Admin Panel to listen on.
    The script did not seem to account for that, even though it was configured during the ISPConfig3 setup.
    The port does not appear in the LISTENING PORTS section, and the report is unedited.
    Despite that, I am still able to connect to the port through a browser in HTTPS.
    The port in question being ****

    Code:
    #> cat htf_report.txt
    
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Debian GNU/Linux 11 (bullseye)
     
    [INFO] uptime:  21:20:10 up 3 days,  3:18,  1 user,  load average: 0.04, 0.08, 0.08
     
    [INFO] memory:
                   total        used        free      shared  buff/cache   available
    Mem:           7.5Gi       2.1Gi       894Mi        11Mi       4.5Gi       5.1Gi
    Swap:          8.0Gi       1.0Mi       8.0Gi
     
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.2.7p1
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 7.4.25
    
    ##### PORT CHECK #####
    
    [WARN] Port 8080 (ISPConfig) seems NOT to be listening
    
    ##### MAIL SERVER CHECK #####
    
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
            Apache 2 (PID 268778)
    [INFO] I found the following mail server(s):
            Postfix (PID 268506)
    [INFO] I found the following pop3 server(s):
            Dovecot (PID 268709)
    [INFO] I found the following imap server(s):
            Dovecot (PID 268709)
    [INFO] I found the following ftp server(s):
            PureFTP (PID 268841)
    
    ##### LISTENING PORTS #####
    (only           ()
    Local           (Address)
    [anywhere]:993          (268709/dovecot)
    [anywhere]:995          (268709/dovecot)
    [localhost]:10023               (948/postgrey)
    [localhost]:10024               (268527/amavisd-new)
    [localhost]:10025               (268506/master)
    [localhost]:10027               (268506/master)
    [anywhere]:587          (268506/master)
    ***.***.***.***:139             (1310/smbd)
    [localhost]:11211               (1003/memcached)
    [anywhere]:110          (268709/dovecot)
    [anywhere]:143          (268709/dovecot)
    [anywhere]:465          (268506/master)
    ***.***.***.***:53              (268859/named)
    ***.***.***.***:53              (268859/named)
    ***.***.***.***:53              (268859/named)
    ***.***.***.***:53              (268859/named)
    ***.***.***.***:53              (268859/named)
    ***.***.***.***:53              (268859/named)
    ***.***.***.***:53              (268859/named)
    ***.***.***.***:53              (268859/named)
    [localhost]:53          (268859/named)
    [localhost]:53          (268859/named)
    [localhost]:53          (268859/named)
    [localhost]:53          (268859/named)
    [anywhere]:21           (268841/pure-ftpd)
    [anywhere]:22           (239661/sshd:)
    [localhost]:953         (268859/named)
    [anywhere]:25           (268506/master)
    ***.***.***.***:666             (1119/darkstat)
    ***.***.***.***:445             (1310/smbd)
    [localhost]983          (268778/apache2)
    *:*:*:*::*:993          (268709/dovecot)
    *:*:*:*::*:995          (268709/dovecot)
    *:*:*:*::*:10023                (948/postgrey)
    *:*:*:*::*:10024                (268527/amavisd-new)
    *:*:*:*::*:3306         (268193/mariadbd)
    *:*:*:*::*:587          (268506/master)
    [localhost]10           (268709/dovecot)
    [localhost]43           (268709/dovecot)
    *:*:*:*::*:80           (268778/apache2)
    *:*:*:*::*:8081         (268778/apache2)
    *:*:*:*::*:465          (268506/master)
    *:*:*:*::*:21           (268841/pure-ftpd)
    *:*:*:*::*:53           (268859/named)
    *:*:*:*::*:53           (268859/named)
    *:*:*:*::*:53           (268859/named)
    *:*:*:*::*:53           (268859/named)
    *:*:*:*::*e2d5:5eff:fe56:53             (268859/named)
    *:*:*:*::*e2d5:5eff:fe56:53             (268859/named)
    *:*:*:*::*e2d5:5eff:fe56:53             (268859/named)
    *:*:*:*::*e2d5:5eff:fe56:53             (268859/named)
    *:*:*:*::*5aef:68ff:feb4:53             (268859/named)
    *:*:*:*::*5aef:68ff:feb4:53             (268859/named)
    *:*:*:*::*5aef:68ff:feb4:53             (268859/named)
    *:*:*:*::*5aef:68ff:feb4:53             (268859/named)
    *:*:*:*::*:22           (239661/sshd:)
    *:*:*:*::*:25           (268506/master)
    *:*:*:*::*:953          (268859/named)
    *:*:*:*::*:443          (268778/apache2)
    *:*:*:*::*:40859                (1128/miniupnpd)
    
    
    
    
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination        
    f2b-postfix-sasl  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 25
    f2b-sshd   tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 22
    f2b-postfix-sasl  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 25
    f2b-dovecot  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 110,995,143,993,587,465,4190
    f2b-pure-ftpd  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 21
    f2b-sshd   tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 22
    DROP       all  --  ***.***.***.***/24     [anywhere]/0          
    DROP       all  --  ***.***.***.***/24      [anywhere]/0          
    DROP       all  --  ***.***.***.***/24     [anywhere]/0          
    DROP       all  --  ***.***.***.***/24      [anywhere]/0          
    DROP       all  --  ***.***.***.***/12        [anywhere]/0          
    DROP       all  --  ***.***.***.***/22     [anywhere]/0          
    DROP       all  --  ***.***.***.***/24     [anywhere]/0          
    DROP       all  --  ***.***.***.***/16       [anywhere]/0          
    DROP       all  --  ***.***.***.***/17      [anywhere]/0          
    DROP       all  --  ***.***.***.***/16        [anywhere]/0          
    DROP       all  --  ***.***.***.***/29   [anywhere]/0          
    DROP       all  --  ***.***.***.***/23     [anywhere]/0          
    DROP       all  --  ***.***.***.***/15       [anywhere]/0          
    DROP       all  --  ***.***.***.***/20       [anywhere]/0          
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination        
    MINIUPNPD  all  --  [anywhere]/0            [anywhere]/0          
    ACCEPT     tcp  --  [anywhere]/0            ***.***.***.***           tcp dpt:25565
    ACCEPT     tcp  --  [anywhere]/0            ***.***.***.***           tcp dpt:30000
    ACCEPT     tcp  --  [anywhere]/0            ***.***.***.***          tcp dpt:3306
    ACCEPT     udp  --  [anywhere]/0            ***.***.***.***          udp dpt:7777
    ACCEPT     udp  --  [anywhere]/0            ***.***.***.***          udp dpt:15777
    ACCEPT     udp  --  [anywhere]/0            ***.***.***.***          udp dpt:15000
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination        
    
    Chain MINIUPNPD (1 references)
    target     prot opt source               destination        
    
    Chain f2b-dovecot (1 references)
    target     prot opt source               destination        
    RETURN     all  --  [anywhere]/0            [anywhere]/0          
    
    Chain f2b-postfix-sasl (2 references)
    target     prot opt source               destination        
    RETURN     all  --  [anywhere]/0            [anywhere]/0          
    RETURN     all  --  [anywhere]/0            [anywhere]/0          
    
    Chain f2b-pure-ftpd (1 references)
    target     prot opt source               destination        
    RETURN     all  --  [anywhere]/0            [anywhere]/0          
    
    Chain f2b-sshd (2 references)
    target     prot opt source               destination        
    REJECT     all  --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    RETURN     all  --  [anywhere]/0            [anywhere]/0          
    RETURN     all  --  [anywhere]/0            [anywhere]/0          
    
    
    
    
    ##### LET'S ENCRYPT #####
    Certbot is installed in /usr/bin/letsencrypt
     
    Last edited: Jan 2, 2022
  6. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Try
    Code:
    apt install php7.4-cgi
     
  7. nuhnuh

    nuhnuh New Member

    Thank you!
    This worked.
    It must have been removed after the 'apt autoremove' following the upgrade.
    I installed "php-cgi" rather than the specific version to keep it on a rolling update, as I'm using the unversioned "php" package though.

    But I can't thank you enough!
     
  8. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    No problem, glad to hear!
     

Share This Page