Я использую версию программного обеспечения, упомянутую в теме. Apache был установлен из стандартного репозитория centos, fastcgi был установлен из http://centos.karan.org/kbsingh-CentOS-Extras.repo и PHp был вручную скомпилирован и установлен в / usr / local / php5-fastcgi.
Я продолжаю получать ошибки сервера 5xx, когда пытаюсь посетить URL-адрес, например http://vantagefx.com/affiliate/merchants/ , (и я не использую suexec btw).
vhost
<VirtualHost x.x.x:80>
ServerAdmin webmaster@example.com
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<IfModule mod_fcgid.c>
<Directory /var/www/html/php530-files/>
Options +ExecCGI
AllowOverride All
AddHandler fcgid-script .php
FCGIWrapper /var/www/php-fcgi-scripts/php-fcgi-starter .php
Order allow,deny
Allow from all
</Directory>
</IfModule>
/ вар / www / php-fcgi-скрипты / php-fcgi-стартер
#!/bin/sh
export PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_CHILDREN=8
exec /usr/local/php5-fcgi/bin/php -c /etc/php.ini
журнал ошибок
[Wed Sep 08 02:39:25 2010] [notice] mod_fcgid: process /var/www/html/php530-files/scripts/imp.php(2319) exit(communication error), terminated by calling exit(), r5
[Wed Sep 08 02:39:30 2010] [notice] mod_fcgid: call /var/www/html/php530-files/scripts/imp.php with wrapper /var/www/php-fcgi-scripts/php-fcgi-starter
[Wed Sep 08 02:39:31 2010] [notice] mod_fcgid: call /var/www/html/php530-files/scripts/imp.php with wrapper /var/www/php-fcgi-scripts/php-fcgi-starter
[Wed Sep 08 02:39:32 2010] [notice] mod_fcgid: call /var/www/html/php530-files/scripts/imp.php with wrapper /var/www/php-fcgi-scripts/php-fcgi-starter
[Wed Sep 08 02:39:33 2010] [notice] mod_fcgid: call /var/www/html/php530-files/scripts/imp.php with wrapper /var/www/php-fcgi-scripts/php-fcgi-starter
[Wed Sep 08 02:39:33 2010] [notice] mod_fcgid: process /var/www/html/php530-files/scripts/imp.php(2340) exit(communication error), terminated by calling exit(), r5
[Wed Sep 08 02:39:33 2010] [notice] mod_fcgid: process /var/www/html/php530-files/scripts/imp.php(2335) exit(communication error), terminated by calling exit(), r5
[Wed Sep 08 02:39:33 2010] [notice] mod_fcgid: process /var/www/html/php530-files/scripts/imp.php(2334) exit(communication error), terminated by calling exit(), r5
[Wed Sep 08 02:39:37 2010] [notice] mod_fcgid: process /var/www/html/php530-files/scripts/imp.php(2341) exit(communication error), terminated by calling exit(), r5
[Wed Sep 08 02:39:42 2010] [notice] mod_fcgid: call /var/www/html/php530-files/scripts/imp.php with wrapper /var/www/php-fcgi-scripts/php-fcgi-starter
[Wed Sep 08 02:39:43 2010] [notice] mod_fcgid: call /var/www/html/php530-files/scripts/imp.php with wrapper /var/www/php-fcgi-scripts/php-fcgi-starter
[Wed Sep 08 02:39:44 2010] [notice] mod_fcgid: call /var/www/html/php530-files/scripts/imp.php with wrapper /var/www/php-fcgi-scripts/php-fcgi-starter
[Wed Sep 08 02:39:45 2010] [notice] mod_fcgid: call /var/www/html/php530-files/scripts/imp.php with wrapper /var/www/php-fcgi-scripts/php-fcgi-starter
[Wed Sep 08 02:39:45 2010] [notice] mod_fcgid: process /var/www/html/php530-files/scripts/imp.php(2364) exit(communication error), terminated by calling exit(), r5
[Wed Sep 08 02:39:45 2010] [notice] mod_fcgid: process /var/www/html/php530-files/scripts/imp.php(2359) exit(communication error), terminated by calling exit(), r5
и:
[Wed Sep 08 09:49:05 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed Sep 08 09:49:06 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed Sep 08 09:49:07 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed Sep 08 09:49:16 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed Sep 08 09:49:17 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed Sep 08 09:49:18 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed Sep 08 09:49:19 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed Sep 08 09:49:28 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed Sep 08 09:49:29 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed Sep 08 09:49:30 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed Sep 08 09:49:31 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed Sep 08 09:49:35 2010] [warn] mod_fcgid: can't apply process slot for /var/www/html/affiliate/phpinfo.php
[Wed Sep 08 09:49:40 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed Sep 08 09:49:41 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed Sep 08 09:49:42 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed Sep 08 09:49:43 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed Sep 08 09:49:52 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed Sep 08 09:49:53 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed Sep 08 09:49:54 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed Sep 08 09:49:55 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Wed Sep 08 09:50:05 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
и если я вручную выполню код
/usr/local/php5-fcgi/bin/php /var/www/html/php530-files/scripts/imp.php
он работает нормально, без ошибок, без предупреждений, без уведомлений.
[РЕДАКТИРОВАТЬ]
PHP-процессы
ps aux | grep php
apache 22494 1.5 0.0 0 0 ? Z 08:16 0:00 [php] <defunct>
root 22500 0.0 0.0 61168 728 pts/0 S+ 08:16 0:00 grep php
Я также создал phpinfo.php внутри каталога php530-files и попытался получить доступ к нему, все еще не повезло, 503 Service Unavailable, и журнал был:
[Wed Sep 08 08:27:45 2010] [notice] mod_fcgid: call /var/www/html/php530-files/phpinfo.php with wrapper /var/www/php-fcgi-scripts/php-fcgi-starter
[Wed Sep 08 08:27:46 2010] [notice] mod_fcgid: call /var/www/html/php530-files/phpinfo.php with wrapper /var/www/php-fcgi-scripts/php-fcgi-starter
Видите ли, этот процесс не завершился из-за какой-либо ошибки связи или чего-то подобного, но я все равно получаю ошибки 5xx.
Разрешения
[root@www php530-files]# ls -l
total 35604
drwxrwxr-x 3 apache vfx_affil 4096 Sep 8 03:41 accounts
drwxrwxr-x 4 apache vfx_affil 4096 Sep 8 03:42 affiliates
drwxrwxr-x 2 apache vfx_affil 4096 Sep 8 03:41 api
-rw-rw-r-- 1 apache vfx_affil 247 Sep 8 03:41 CHANGELOG.txt
drwxrwxr-x 11 apache vfx_affil 4096 Sep 8 03:41 include
-rw-rw-r-- 1 apache vfx_affil 2203 Sep 8 03:41 index.html
drwxrwxr-x 9 apache vfx_affil 4096 Sep 8 03:41 install
-rw-rw-r-- 1 apache vfx_affil 185 Sep 8 03:42 INSTALL.txt
-rw-rw-r-- 1 apache vfx_affil 7643 Sep 8 03:41 LICENSE.txt
drwxrwxr-x 3 apache vfx_affil 4096 Sep 8 03:41 merchants
-rw-rw-r-- 1 apache vfx_affil 36340881 Sep 8 03:41 pap_4.5.19.2.zip
-rw-r--r-- 1 apache vfx_affil 20 Sep 8 08:23 phpinfo.php
drwxrwxr-x 52 apache vfx_affil 4096 Sep 8 03:42 plugins
-rw-rw-r-- 1 apache vfx_affil 1008 Sep 8 03:41 README.txt
drwxrwxr-x 2 apache vfx_affil 4096 Sep 8 03:41 samples_tests
drwxrwxr-x 3 apache vfx_affil 4096 Sep 8 03:50 scripts
-rw-r--r-- 1 apache vfx_affil 31 Sep 8 08:27 test.php
-rw-rw-r-- 1 apache vfx_affil 371 Sep 8 03:41 UPDATE.txt
[root@www affiliate]# ls -l /var/www/php-fcgi-scripts/
total 4
-rwxrwxr-x 1 apache vfx_affil 203 Sep 8 03:39 php-fcgi-starter
Нашел! В моем случае я использовал неправильный двоичный файл php в / var / www / php-fcgi-scripts / php-fcgi-starter, это должен был быть php-cgi.
Прекрасно работает с:
#!/bin/sh
PHP_CGI=/usr/local/php5-fcgi/bin/php-cgi
PHP_INI=/etc/php-fastcgi.ini
export PHP_FCGI_TIMEOUT=1200
export PHP_FCGI_CHILDREN=10
export PHP_FCGI_MAX_REQUESTS=1000
exec $PHP_CGI -c $PHP_INI
Является /var/www/php-fcgi-scripts/php-fcgi-starter
исполняемый файл, и принадлежит ли он и каталог, в котором он находится, пользователю веб-сервера?