сделал первый виртуальный хост, но php и cgi скрипты незапусткаются, браузер просто весит...
пробывал
ps -aux | grep php-cgi
sockstat | grep /var/run/fastcg
нет процессов от пользователя, только от root!
Код: Выделить всё
mark# echo '<?php echo "test string \n"; ?>' | php-cgi
X-Powered-By: PHP/5.2.6
Content-type: text/html
test string
........................
привожу httpd.conf
Код: Выделить всё
ServerRoot "/usr/local"
|
|
|
Listen 80
LoadModule suexec_module libexec/apache2/mod_suexec.so
|
|
|
LoadModule php5_module libexec/apache2/libphp5.so
LoadModule perl_module libexec/apache2/mod_perl.so
LoadModule fastcgi_module libexec/apache2/mod_fastcgi.so
<IfModule !mpm_winnt.c>
<IfModule !mpm_netware.c>
User www
Group www
</IfModule>
</IfModule>
#ServerAdmin vasya@yandex.ru
#ServerName mark.in.ua:80
UseCanonicalName Off
#DocumentRoot "/usr/home/mark/www/data"
<Directory />
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
<Directory "/usr/home/mark/www">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule mod_userdir.c>
UserDir public_html
UserDir disabled root toor daemon operator bin tty kmem games news man sshd bind proxy _pflogd _dhcp uucp pop www nobody mailnull smmsp
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
</IfModule>
AccessFileName .htaccess
|
|
|
ServerTokens Prod
ServerSignature On
Alias /icons/ "/usr/home/mark/www/icons/"
<Directory "/usr/home/mark/www/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "/usr/home/mark/www/cgi-bin/"
<IfModule mod_cgid.c>
</IfModule>
<Directory "/usr/home/mark/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
|
|
|
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
|
|
|
### Section 3: Virtual Hosts
<IfModule mod_fastcgi.c>
FastCgiConfig -singleThreshold 30 -minProcesses 2 -restart \
-idle-timeout 400 -killInterval 200 -autoUpdate \
-pass-header HTTP_AUTHORIZATION
FastCgiWrapper /usr/local/sbin/suexec
FastCgiIpcDir /var/run/fastcgi
Action application/x-httpd-fastphp /php-fcgi/php.sh
Action application/x-httpd-php /php-fcgi/php.sh
AddType application/x-httpd-fastphp .php
<Location /php-fcgi/>
Options ExecCGI FollowSymLinks
SetHandler fastcgi-script
</Location>
</IfModule>
<Directory "/usr/home/*/www/data">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order deny,allow
Allow from all
</Directory>
<Directory "/usr/home/*/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
DirectoryIndex index.php index.html index.htm
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin vasya@yandex.ru
# AliasMatch ^/~([^/]+)(/.*)* /usr/home/$1/data$2
DocumentRoot /usr/home/mark/www/data
ServerName mark.in.ua
SuexecUserGroup mark mark
Alias /php-fcgi/ /usr/home/mark/www/cgi-bin/
CustomLog /var/log/httpd/httpd-access.log combined
ErrorLog /var/log/httpd/httpd-error.log
</VirtualHost>
Include /usr/local/etc/apache2/configs/*.conf
привожу var/log/httpd/httpd-error.log
Код: Выделить всё
[Mon Nov 10 19:31:52 2008] [error] [client 192.168.1.2] FastCGI: comm with (dynamic) server "/usr/home/mark/www/cgi-bin/php.sh" aborted: (first read) idle timeout (400 sec), referer: http://192.168.1.1/
[Mon Nov 10 19:31:52 2008] [error] [client 192.168.1.2] FastCGI: incomplete headers (0 bytes) received from server "/usr/home/mark/www/cgi-bin/php.sh", referer: http://192.168.1.1/
[Mon Nov 10 19:45:54 2008] [error] [client 192.168.1.2] File does not exist: /usr/home/mark/www/data/php-fcgi
[Mon Nov 10 19:45:57 2008] [error] [client 192.168.1.2] FastCGI: invalid (dynamic) server "/usr/home/mark/www/cgi-bin/": script is a directory!
[Mon Nov 10 19:48:21 2008] [error] [client 192.168.1.2] FastCGI: comm with (dynamic) server "/usr/home/mark/www/cgi-bin/php.sh" aborted: (first read) idle timeout (400 sec), referer: http://192.168.1.1/
Код: Выделить всё
[Mon Nov 10 20:09:28 2008] [notice] caught SIGTERM, shutting down
[Mon Nov 10 20:09:33 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/local/sbin/suexec)
[Mon Nov 10 20:09:34 2008] [notice] FastCGI: wrapper mechanism enabled (wrapper: /usr/local/sbin/suexec)
[Mon Nov 10 20:09:34 2008] [notice] FastCGI: process manager initialized (pid 1433)
[Mon Nov 10 20:09:35 2008] [notice] Apache configured -- resuming normal operations
[Mon Nov 10 20:09:41 2008] [warn] FastCGI: (dynamic) server "/usr/home/mark/www/cgi-bin/php.sh" (uid 1001, gid 1001) started (pid 1442)
[Mon Nov 10 20:09:41 2008] [warn] FastCGI: (dynamic) server "/usr/home/mark/www/cgi-bin/php.sh" (pid 1442) terminated by calling exit with status '120'
Код: Выделить всё
[2008-11-10 20:09:56]: uid: (mark/mark) gid: (1001/1001) cmd: php.sh
[2008-11-10 20:09:56]: target uid/gid (1001/1001) mismatch with directory (1001/80) or program (1001/1001)
[2008-11-10 20:19:56]: uid: (mark/mark) gid: (1001/1001) cmd: php.sh
[2008-11-10 20:19:56]: target uid/gid (1001/1001) mismatch with directory (1001/80) or program (1001/1001)
