• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Plesk 11.5 - Webmail Internal Error (cgi_wrapper not in docroot)

decanet

Basic Pleskian
Hi,

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

In Apache logs, I can see:

Code:
# tail -f /var/log/httpd/error_log
[Thu Jun 27 15:16:25 2013] [warn] [client 109.190.53.170] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Thu Jun 27 15:16:25 2013] [error] [client 109.190.53.170] Premature end of script headers: index.php


# tail -f /var/log/httpd/suexec_log
[2013-06-27 15:10:47]: uid: (10026/roundcube_sysuser) gid: (10026/10026) cmd: cgi_wrapper
[2013-06-27 15:10:47]: command cgi_wrapper not in docroot (10026)

Have you got an idea to fix it?

Thanks

regards
 
Please post output of the following commands:

# getent passwd roundcube_sysuser
# getent group roundcube_sysgroup
# plesk bin php_handler --list


and contents of the file /etc/httpd/conf/plesk.conf.d/roundcube.conf or equivalent on your system (leading directories may differ).
 
Thanks for your answer


Code:
# getent passwd roundcube_sysuser
roundcube_sysuser:x:10026:10026:roundcube webmail user:/usr/share/psa-roundcube/:/sbin/nologin


# getent group roundcube_sysgroup
roundcube_sysgroup:x:10026:


# plesk bin php_handler --list
      id:  display name:  full version:  version:    type:          cgi-bin:      php.ini:  custom:
      cgi         5.3.25         5.3.25       5.3      cgi  /usr/bin/php-cgi  /etc/php.ini    false
  fastcgi         5.3.25         5.3.25       5.3  fastcgi  /usr/bin/php-cgi  /etc/php.ini    false
   module         5.3.25         5.3.25       5.3   module  /usr/bin/php-cgi  /etc/php.ini    false

The file /etc/httpd/conf/plesk.conf.d/roundcube.conf is a big file. There are a new VirtualHost for each IP so I post just one:

Code:
<VirtualHost \
    XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        XX.XX.XX.XX:7080 \
        127.0.0.1:7080 \
    >
    ServerName roundcube.webmail
    ServerAlias roundcube.webmail.*
    ServerAdmin "[email protected]"

    Include "/etc/httpd/conf/plesk.conf.d/webmails/roundcube/*.conf"
    UseCanonicalName Off

    DocumentRoot "/usr/share/psa-roundcube/"
    Alias /roundcube/ "/usr/share/psa-roundcube/"

    <IfModule mod_suexec.c>
        SuexecUserGroup roundcube_sysuser roundcube_sysgroup
    </IfModule>

    <IfModule mod_fcgid.c>
            FcgidInitialEnv PP_CUSTOM_PHP_CGI_INDEX fastcgi
            FcgidInitialEnv PP_CUSTOM_PHP_INI "/etc/psa-webmail/roundcube/php.ini"
            FcgidMaxRequestLen 134217728
        <Directory "/usr/share/psa-roundcube/">
            Options -Indexes FollowSymLinks
            AllowOverride FileInfo
            Order allow,deny
            Allow from all
            Include "/etc/httpd/conf/plesk.conf.d/roundcube.htaccess.inc"

            <Files ~ (\.php$)>
                SetHandler fcgid-script
                FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .php
                Options +ExecCGI
            </Files>
        </Directory>
    </IfModule>
</VirtualHost>

<IfModule mod_ssl.c>
<VirtualHost \
    XX.XX.XX.XX:7081 \
    127.0.0.1:7081 \
    >
    ServerName roundcube.webmail
    ServerAlias roundcube.webmail.*
    ServerAdmin "[email protected]"

    Include "/etc/httpd/conf/plesk.conf.d/webmails/roundcube/*.conf"
    UseCanonicalName Off

    DocumentRoot "/usr/share/psa-roundcube/"
    Alias /roundcube/ "/usr/share/psa-roundcube/"

    SSLEngine on
    SSLVerifyClient none
    SSLCertificateFile "/usr/local/psa/var/certificates/cert-bQgN17"

    <IfModule mod_suexec.c>
        SuexecUserGroup roundcube_sysuser roundcube_sysgroup
    </IfModule>

    <IfModule mod_fcgid.c>
            FcgidInitialEnv PP_CUSTOM_PHP_CGI_INDEX fastcgi
            FcgidInitialEnv PP_CUSTOM_PHP_INI "/etc/psa-webmail/roundcube/php.ini"
            FcgidMaxRequestLen 134217728
        <Directory "/usr/share/psa-roundcube/">
            Options -Indexes FollowSymLinks
            AllowOverride FileInfo
            Order allow,deny
            Allow from all
            Include "/etc/httpd/conf/plesk.conf.d/roundcube.htaccess.inc"

            <Files ~ (\.php$)>
                SetHandler fcgid-script
                FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .php
                Options +ExecCGI
            </Files>
        </Directory>
    </IfModule>

    
</VirtualHost>
</IfModule>

In /etc/httpd/conf/plesk.conf.d/webmails/roundcube/ directory, I've just one file which contains :

ServerAlias "webmail.domain.tld"


EDIT : After a little test on an other domain, I'v the same error when PHP is configured in fastcgi mode. Only the "apache module" mode works.
 
Last edited:
Hi, how you fix it ? I have the same problem.

thanks

Hi, I don't realy fix the problem.

I've found a solution, but after each Plesk upgrade, there problem is back.

I've done:

Code:
# find /root -name "psa-suexec" -type f
// I found this file : /root/parallels/PSA_11.0.9/microupdates/MU46/dist-rpm-CentOS-6-x86_64/psa-suexec Maybe you will find an other version file
# cp -p /root/parallels/PSA_11.0.9/microupdates/MU46/dist-rpm-CentOS-6-x86_64/psa-suexec /usr/sbin/psa-suexec
# ln -s /usr/sbin/psa-suexec /usr/sbin/suexec
# service httpd restart && service php-fpm restart && service nginx restart
 
Thanks decanet, in this way is working also for me but is just a workaround... anyone have tickets open with psa ? otherwise I can open one.
 
Back
Top