Доброго времени суток!
коллеги, помогите, пожалуйста, настроить fcgi, выдаёт 500 ошибку почему-то при входе на index.php.
Centos 7.
# httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built: Apr 12 2017 21:03:28
# /usr/sbin/suexec -V
-D AP_DOC_ROOT="/www"
-D AP_GID_MIN=100
-D AP_HTTPD_USER="apache"
-D AP_LOG_EXEC="/var/log/httpd/suexec.log"
-D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
-D AP_UID_MIN=500
-D AP_USERDIR_SUFFIX="public_html"
# apachectl -M | grep fcgi
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
proxy_fcgi_module (shared)
fcgid_module (shared)
/etc/httpd/conf.d/site1.ru.conf
<VirtualHost *:80>
ServerName site1.ru
ServerAlias www.site1.ru
DocumentRoot /www/http/site1.ru/html
<IfModule mod_fcgid.c>
SuexecUserGroup apache apache
FcgidBusyTimeout 3600
<Directory /www/http/site1.ru/html>
DirectoryIndex index.php index.html
Options FollowSymLinks
Options +ExecCGI
AllowOverride All
AddHandler fcgid-script .php
FCGIWrapper /www/cgi-bin/5.6.24-1.fcgi .php
Require all granted
</Directory>
</IfModule>
ErrorLog /www/http/site1.ru/logs/error.log
CustomLog /www/http/site1.ru/logs/access.log common
</VirtualHost>
/www/cgi-bin/5.6.24-1.fcgi
#!/bin/bash
PHPRC="/www/http/site1.ru/php.ini"
PHP_FCGI_CHILDREN=4
# PHP_FCGI_MAX_REQUESTS=1000
export PHPRC
export PHP_FCGI_CHILDREN
export PHP_FCGI_MAX_REQUESTS
exec /opt/php/5.6.24-1/bin/php-cgi
/www/http/site1.ru/php.ini
date.timezone = "Europe/Moscow"
mbstring.func_overload = 2
mbstring.internal_encoding = "UTF-8"
memory_limit = 128M
file_uploads = On
max_input_time = 1500
max_execution_time = 1500
upload_max_filesize = 500M
post_max_size = 500M
max_input_vars = 10000
realpath_cache_size = 4096k
cgi.fix_pathinfo=1
# apachectl -M | grep fcgi
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
proxy_fcgi_module (shared)
fcgid_module (shared)
В итоге - ошибка 500 при входе на http://site1.ru/ и в логах вот что:
[Thu Jul 13 22:25:29.368195 2017] [fcgid:warn] [pid 26347] (104)Connection reset by peer: [client 127.0.0.1:46452] mod_fcgid: error reading data from FastCGI server
[Thu Jul 13 22:25:29.368255 2017] [core:error] [pid 26347] [client 127.0.0.1:46452] End of script output before headers: index.php