• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Webmail (horde or roundcube) 500 Internal Error (cgi_wrapper not in docroot)

Chrisg

New Pleskian
Hi,

I've upgraded Plesk to Onyx version.
Since this upgrade, webmail.domain.tld show me a 500 Internal Error.

In /var/log/apache2/error.log, I can see :
Code:
[Thu Jul 13 08:46:50.482791 2017] [fcgid:warn] [pid 13437] (104)Connection reset by peer: [client X.X.X.X:44737] mod_fcgid: error reading data from FastCGI server
[Thu Jul 13 08:46:50.482828 2017] [core:error] [pid 13437] [client X.X.X.X:44737] End of script headers output before headers: index.php

In /var/log/apache2/suexec.log, I can see :
Code:
[2017-07-13 08:46:50]: uid: (995/roundcube_sysuser) gid: (1007/1007) cmd: cgi_wrapper
[2017-07-13 08:46:50]: command cgi_wrapper not in docroot (995)



getent passwd roundcube_sysuser
Code:
roundcube_sysuser:x:995:1007:roundcube webmail user:/usr/share/psa-roundcube:/bin/false


getent group roundcube_sysgroup
Code:
roundcube_sysgroup:x:1007:


plesk bin php_handler --list
Code:
                id:        display name:  full version:  version:    type:                         cgi-bin:                          php-cli:                          php.ini:  custom:     status:
                cgi   5.5.9 by OS vendor          5.5.9       5.5      cgi                /usr/bin/php5-cgi                   /usr/bin/php5               /etc/php5/cgi/php.ini    false    disabled
            fastcgi   5.5.9 by OS vendor          5.5.9       5.5  fastcgi                /usr/bin/php5-cgi                   /usr/bin/php5               /etc/php5/cgi/php.ini    false     enabled
                fpm   5.5.9 by OS vendor          5.5.9       5.5      fpm                /usr/bin/php5-pfm                   /usr/bin/php5               /etc/php5/fpm/php.ini    false     enabled
             module   5.5.9 by OS vendor          5.5.9       5.5   module                /usr/bin/php5-cgi                   /usr/bin/php5           /etc/php5/apache2/php.ini    false     enabled
    plesk-php56-cgi               5.6.31         5.6.31       5.6      cgi   /opt/plesk/php/5.6/bin/php-cgi      /opt/plesk/php/5.6/bin/php      /opt/plesk/php/5.6/etc/php.ini     true    disabled
plesk-php56-fastcgi               5.6.31         5.6.31       5.6  fastcgi   /opt/plesk/php/5.6/bin/php-cgi      /opt/plesk/php/5.6/bin/php      /opt/plesk/php/5.6/etc/php.ini     true     enabled
    plesk-php56-fpm               5.6.31         5.6.31       5.6      fpm  /opt/plesk/php/5.6/sbin/php-fpm      /opt/plesk/php/5.6/bin/php      /opt/plesk/php/5.6/etc/php.ini     true     enabled
    plesk-php70-cgi               7.0.21         7.0.21       7.0      cgi   /opt/plesk/php/7.0/bin/php-cgi      /opt/plesk/php/7.0/bin/php      /opt/plesk/php/7.0/etc/php.ini     true    disabled
plesk-php70-fastcgi               7.0.21         7.0.21       7.0  fastcgi   /opt/plesk/php/7.0/bin/php-cgi      /opt/plesk/php/7.0/bin/php      /opt/plesk/php/7.0/etc/php.ini     true     enabled
    plesk-php70-fpm               7.0.21         7.0.21       7.0      fpm  /opt/plesk/php/7.0/sbin/php-fpm      /opt/plesk/php/7.0/bin/php      /opt/plesk/php/7.0/etc/php.ini     true     enabled

I tried lot of tricks from KB or from this forum without success, and now I don't know what to try for resolving this issue.
Have you got an idea to fix it?

Thanks.

Regards.
 
Thanks, but I already try this and the problem is still present.

If I modify the config of a website with php-fcgi I also get a 500 Internal error.

I don't know how to correct this.
 
Hello,

It might be caused by that suexec binary which installed by plesk has been replaced with system one. To found what binary is used on your system please run:
Code:
[root@a10-52-66-245 ~]# httpd -V 2>&1 | grep SUEXEC
 -D SUEXEC_BIN="/usr/sbin/suexec"

And then compare with Plesk-provided - it can be found in /usr/lib64/plesk-9.0/suexec/psa-suexec or /usr/lib/plesk-9.0/suexec/psa-suexec. If files is differ, you need to replace system one with Plesk provided, but please be careful with permission and ownership
 
The problem is likely to be due to the fact that the webroot is /home/www instead of /var/www.
At least one .php file is working fine through suexec, but somehow the webmails or websites with php-fcgi don't want to work.

Code:
root@sweb:/root# /usr/sbin/apache2 -V 2>&1|grep SUEXEC
 -D SUEXEC_BIN="/usr/lib/apache2/suexec"
root@sweb:/root# ls -al /usr/lib/apache2/suexec /usr/lib/plesk-9.0/suexec/psa-suexec
-r-s--x--- 1 root www-data 65016 Jul 18 06:31 /usr/lib/apache2/suexec
-rwxr-xr-x 1 root root     65016 Mar 17 10:24 /usr/lib/plesk-9.0/suexec/psa-suexec
root@sweb:/root# md5sum /usr/lib/apache2/suexec /usr/lib/plesk-9.0/suexec/psa-suexec
9683b7741d47735a26a2d8d39811b419  /usr/lib/apache2/suexec
9683b7741d47735a26a2d8d39811b419  /usr/lib/plesk-9.0/suexec/psa-suexec

so the suexec used has not been replaced by another one.

Code:
root@sweb:/root# cat /etc/apache2/suexec/www-data
/home/www
cgi-bin
#(...)

yet, each time I try to access the webmail, I get :

Code:
[2017-07-22 17:36:31]: uid: (995/roundcube_sysuser) gid: (1007/1007) cmd: cgi_wrapper
[2017-07-22 17:36:31]: command cgi_wrapper not in docroot (995)
 
Hello,

Very strange ... I tries to reproduce your issue, but without luck - roundcube works properly. Could you please write - what exact OS/Plesk version did you have? And how do you transfer virtual hosts to new location, via transvhost utility or some other way? Did you have customized virtual hosts templates (check the contents of /usr/local/psa/admin/conf/templates/custom) ?
 
OS: Ubuntu 14.04.5 LTS‬
Plesk : Plesk Onyx Version 17.5.3 Update 14

Hosts have been moved with the transvhosts script.

The /usr/local/psa/admin/conf/templates/ directory doesn't exist.
 
Sorry, I mean the /usr/local/psa/admin/conf/templates/custom doesn't exist, there are only
/usr/local/psa/admin/conf/templates/default
/usr/local/psa/admin/conf/templates/pci_compliance
 
It's not resolved, the problem still exist.

The "custom" folder has been created and one domain has been reconfigurated without any changes.

I don't really understand why we need to "custom" configuration files, we just want to use the server default, and of course the default templates aren't modified.

Could you please explain the benefit of your proposition ?
 
Back
Top