- Plesk for Linux
PHP in FastCGI mode does not work. It seems to work properly with SELinux disabled, but it generates error when it is in "Enforcing" state.
Apache error log files contain the following entries
In domains error log /var/www/vhosts/example.com/logs/error_log:
PLESK_INFO: [warn] [client 203.0.113.2] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[error] [client 203.0.113.2] Premature end of script headers: info.php
In server wide error log /var/log/httpd/error_log:
PLESK_INFO: failed to open log file /var/log/httpd/suexec_log
fopen: Permission denied
log file can be found the following error:
PLESK_INFO: [2017-08-07 23:58:46]: uid: (10004/johndoe) gid: (503/503) cmd: cgi_wrapper [2017-08-07 23:58:46]: failed to setgid (503: cgi_wrapper)
Invalid SELinux security context.
Connect to the server using SSH
Set the correct security context to the
# chcon system_u:object_r:httpd_suexec_exec_t:s0 /usr/sbin/suexec