Система Free BSD 6.3 Release, Apache 2.2, php 5.2.5, все ставилось из портов.
Вот конфиг Apache:
httpd.conf
Код: Выделить всё
ServerRoot "/usr/local"
Listen 192.168.0.56:80
LoadModule authn_file_module libexec/apache22/mod_authn_file.so
LoadModule authn_dbm_module libexec/apache22/mod_authn_dbm.so
LoadModule authn_anon_module libexec/apache22/mod_authn_anon.so
LoadModule authn_default_module libexec/apache22/mod_authn_default.so
LoadModule authn_alias_module libexec/apache22/mod_authn_alias.so
LoadModule authz_host_module libexec/apache22/mod_authz_host.so
LoadModule authz_groupfile_module libexec/apache22/mod_authz_groupfile.so
LoadModule authz_user_module libexec/apache22/mod_authz_user.so
LoadModule authz_dbm_module libexec/apache22/mod_authz_dbm.so
LoadModule authz_owner_module libexec/apache22/mod_authz_owner.so
LoadModule authz_default_module libexec/apache22/mod_authz_default.so
LoadModule auth_basic_module libexec/apache22/mod_auth_basic.so
LoadModule auth_digest_module libexec/apache22/mod_auth_digest.so
LoadModule file_cache_module libexec/apache22/mod_file_cache.so
LoadModule cache_module libexec/apache22/mod_cache.so
LoadModule disk_cache_module libexec/apache22/mod_disk_cache.so
LoadModule dumpio_module libexec/apache22/mod_dumpio.so
LoadModule include_module libexec/apache22/mod_include.so
LoadModule filter_module libexec/apache22/mod_filter.so
LoadModule charset_lite_module libexec/apache22/mod_charset_lite.so
LoadModule deflate_module libexec/apache22/mod_deflate.so
LoadModule log_config_module libexec/apache22/mod_log_config.so
LoadModule logio_module libexec/apache22/mod_logio.so
LoadModule env_module libexec/apache22/mod_env.so
LoadModule mime_magic_module libexec/apache22/mod_mime_magic.so
LoadModule cern_meta_module libexec/apache22/mod_cern_meta.so
LoadModule expires_module libexec/apache22/mod_expires.so
LoadModule headers_module libexec/apache22/mod_headers.so
LoadModule usertrack_module libexec/apache22/mod_usertrack.so
LoadModule unique_id_module libexec/apache22/mod_unique_id.so
LoadModule setenvif_module libexec/apache22/mod_setenvif.so
LoadModule version_module libexec/apache22/mod_version.so
LoadModule mime_module libexec/apache22/mod_mime.so
LoadModule dav_module libexec/apache22/mod_dav.so
LoadModule status_module libexec/apache22/mod_status.so
LoadModule autoindex_module libexec/apache22/mod_autoindex.so
LoadModule asis_module libexec/apache22/mod_asis.so
LoadModule info_module libexec/apache22/mod_info.so
LoadModule suexec_module libexec/apache22/mod_suexec.so
LoadModule cgi_module libexec/apache22/mod_cgi.so
LoadModule dav_fs_module libexec/apache22/mod_dav_fs.so
LoadModule vhost_alias_module libexec/apache22/mod_vhost_alias.so
LoadModule negotiation_module libexec/apache22/mod_negotiation.so
LoadModule dir_module libexec/apache22/mod_dir.so
LoadModule imagemap_module libexec/apache22/mod_imagemap.so
LoadModule actions_module libexec/apache22/mod_actions.so
LoadModule speling_module libexec/apache22/mod_speling.so
LoadModule userdir_module libexec/apache22/mod_userdir.so
LoadModule alias_module libexec/apache22/mod_alias.so
LoadModule rewrite_module libexec/apache22/mod_rewrite.so
LoadModule fastcgi_module libexec/apache22/mod_fastcgi.so
<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
<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 /fcgi-bin/php.sh
Action application/x-httpd-php /fcgi-bin/php.sh
AddType application/x-httpd-fastphp .php
<Location /fcgi-bin/>
Options ExecCGI FollowSymLinks
SetHandler fastcgi-script
</Location>
</IfModule>
User www
Group www
</IfModule>
</IfModule>
ServerAdmin admin@my-domain.local
ServerName 192.168.0.56:80
DocumentRoot "/usr/local/www/apache22/data"
<Directory />
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "/home/www/*/htdocs">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order deny,allow
Allow from all
</Directory>
<Directory "/home/www/*/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
<IfModule dir_module>
DirectoryIndex index.php index.html index.htm
</IfModule>
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
ErrorLog "/var/log/httpd/httpd-error.log"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "/var/log/httpd/httpd-access.log" combined
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/usr/local/www/apache22/cgi-bin/"
</IfModule>
<IfModule cgid_module>
#
# ScriptSock: On threaded servers, designate the path to the UNIX
# socket used to communicate with the CGI daemon of mod_cgid.
#
#Scriptsock /var/run/cgisock
</IfModule>
<Directory "/usr/local/www/apache22/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
DefaultType text/plain
<IfModule mime_module>
TypesConfig etc/apache22/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType text/html .shtml .shtm .html .htm
AddOutputFilter INCLUDES .shtml .shtm .html .htm
</IfModule>
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin admin@my-domain.local
DocumentRoot /home/www/my-domain/htdocs
ServerName web.mydomain.local
SuexecUserGroup vhost vhost
Alias /fcgi-bin/ /home/www/my-domain/cgi-bin/
CustomLog /var/log/httpd/httpd-access.log combined
ErrorLog /var/log/httpd/httpd-error.log
</VirtualHost>
Include etc/apache22/Includes/*.conf
В адресе пишу http://192.168.0.56/fcgi-bin/calc.php и тишина.
Вот что в логах
httpd-error.log
Код: Выделить всё
[Wed Apr 02 11:15:31 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/local/sbin/suexec)
[Wed Apr 02 11:15:32 2008] [notice] Digest: generating secret for digest authentication ...
[Wed Apr 02 11:15:32 2008] [notice] Digest: done
[Wed Apr 02 11:15:32 2008] [notice] FastCGI: wrapper mechanism enabled (wrapper: /usr/local/sbin/suexec)
[Wed Apr 02 11:15:32 2008] [notice] FastCGI: process manager initialized (pid 1358)
[Wed Apr 02 11:15:33 2008] [notice] Apache/2.2.8 (FreeBSD) DAV/2 mod_fastcgi/2.4.6 configured -- resuming normal operations
[Wed Apr 02 11:15:57 2008] [warn] FastCGI: (dynamic) server "/home/www/my-domain/cgi-bin/calc.php" (uid 10023, gid 10031) started (pid 1370)
suexec failure: could not open log file
fopen: Permission denied
[Wed Apr 02 11:15:57 2008] [warn] FastCGI: (dynamic) server "/home/www/my-domain/cgi-bin/calc.php" (pid 1370) terminated by calling exit with status '1'
[Wed Apr 02 11:16:02 2008] [warn] FastCGI: (dynamic) server "/home/www/my-domain/cgi-bin/calc.php" (uid 10023, gid 10031) restarted (pid 1376)
suexec failure: could not open log file
fopen: Permission denied
[Wed Apr 02 11:16:02 2008] [warn] FastCGI: (dynamic) server "/home/www/my-domain/cgi-bin/calc.php" (pid 1376) terminated by calling exit with status '1'
[Wed Apr 02 11:16:07 2008] [warn] FastCGI: (dynamic) server "/home/www/my-domain/cgi-bin/calc.php" (uid 10023, gid 10031) restarted (pid 1381)
suexec failure: could not open log file
fopen: Permission denied
[Wed Apr 02 11:16:07 2008] [warn] FastCGI: (dynamic) server "/home/www/my-domain/cgi-bin/calc.php" (pid 1381) terminated by calling exit with status '1'
[Wed Apr 02 11:16:12 2008] [warn] FastCGI: (dynamic) server "/home/www/my-domain/cgi-bin/calc.php" (uid 10023, gid 10031) restarted (pid 1382)
suexec failure: could not open log file
fopen: Permission denied
[Wed Apr 02 11:16:12 2008] [warn] FastCGI: (dynamic) server "/home/www/my-domain/cgi-bin/calc.php" (pid 1382) terminated by calling exit with status '1'
[Wed Apr 02 11:16:12 2008] [warn] FastCGI: (dynamic) server "/home/www/my-domain/cgi-bin/calc.php" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds
[Wed Apr 02 11:16:13 2008] [warn] FastCGI: (dynamic) server "/home/www/my-domain/cgi-bin/calc.php" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds
[Wed
Код: Выделить всё
[2008-04-02 11:15:57]: uid: (vhost/vhost) gid: (10031/10031) cmd: calc.php
[2008-04-02 11:16:02]: uid: (vhost/vhost) gid: (10031/10031) cmd: calc.php
[2008-04-02 11:16:07]: uid: (vhost/vhost) gid: (10031/10031) cmd: calc.php
[2008-04-02 11:16:12]: uid: (vhost/vhost) gid: (10031/10031) cmd: calc.php
