Webmail or website shows Internal Server Error

Created:

2016-11-16 13:23:56 UTC

Modified:

2017-04-26 19:03:26 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Webmail or website shows Internal Server Error

Applicable to:

  • Plesk for Linux

Symptoms

  • A webmail is not accessible and the following error is shown:

    Internal Server Error
  • CGI scripts do not work for a domain. Websites with PHP-FastCGI handler are not working. If change PHP handler to PHP-FPM websites work fine.

  • The following error can be found in /var/log/httpd/suexec_log file:

    uid: (10021/horde_sysuser) gid: (510/510) cmd: cgi_wrapper
    target uid/gid (10021/510 or 504) mismatch with directory (0/503) or program (0/0)
    uid: (2523/horde_sysuser) gid: (2521/2521) cmd: cgi_wrapper
    directory is writable by others: (/var/www/cgi-bin/cgi_wrapper)

    Or:

    uid: (996/roundcube_sysuser) gid: (1006/1006) cmd: cgi_wrapper
    file has no execute permission: (/var/www/cgi-bin/cgi_wrapper/cgi_wrapper)
  • The following errors can be found in /var/log/httpd/error_log:

    [error] [client 203.0.113.2] Directory index forbidden by Options directive: /var/www/html/, referer: http://203.0.113.2:8880/admin/domain/list?context=domains

    Or:

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

Cause

Incorrect permissions for /var/www/cgi-bin/cgi_wrapper directory or its content.

Resolution

Set correct permissions as follows:

# chown -R root:root /var/www/cgi-bin/cgi_wrapper
# chmod -R 755 /var/www/cgi-bin/cgi_wrapper

Note: directory location can differ, pay attention to the path in the error.

Have more questions? Submit a request
Please sign in to leave a comment.