
Черновой вариант статьи по установке mod_fcgi
ПхпЭ уже было утсановлено , поэтому нужно было посмотреть что у него есть,
и добавить чего не хватает,и убрать Apache module
Код: Выделить всё
cd /usr/ports/lang/php5
make showconfig | grep FASTCGI
FASTCGI=off "Enable fastcgi support (CGI only)"
make config
make install
Код: Выделить всё
make showconfig
===> The following configuration options are available for php5-5.2.6:
CLI=on "Build CLI version"
CGI=on "Build CGI version"
APACHE=off "Build Apache module"
DEBUG=off "Enable debug"
SUHOSIN=on "Enable Suhosin protection system (not for jails)"
MULTIBYTE=on "Enable zend multibyte support"
IPV6=off "Enable ipv6 support"
MAILHEAD=on "Enable mail header patch"
REDIRECT=on "Enable force-cgi-redirect support (CGI only)"
DISCARD=on "Enable discard-path support (CGI only)"
FASTCGI=on "Enable fastcgi support (CGI only)"
PATHINFO=on "Enable path-info-check support (CGI only)"
===> Use 'make config' to modify these settings
Код: Выделить всё
# cd /usr/ports/www/mod_fcgid
# make install clean
смотрим...
Код: Выделить всё
php-cgi -v
PHP 5.2.6 with Suhosin-Patch 0.9.6.2 (cgi-fcgi) (built: Aug 3 2008 12:03:28)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
Если данный вывод отличаеться от приведенного здесь, а именно
(cgi-fcgi) php5 необходимо пересобрать с указанными выше опциями
убираем mod_php
Код: Выделить всё
#LoadModule php5_module libexec/apache2/libphp5.so
Код: Выделить всё
LoadModule fcgid_module libexec/apache2/mod_fcgid.so
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
FCGIWrapper /usr/local/bin/php-cgi .php
</IfModule>
Код: Выделить всё
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

да наверно не доконца понял..вобщем далее сделал так :
Код: Выделить всё
<Directory "/usr/local/www/data">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.0/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit Indexes
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
SetHandler fcgid-script
FCGIWrapper /usr/local/bin/php-cgi .php
Options ExecCGI
Allow from all
</Directory>
Код: Выделить всё
/usr/local/etc/rc.d/apache2 restart
Performing sanity check on apache2 configuration:
Syntax OK
Stopping apache2.
Waiting for PIDS: 5883.
Performing sanity check on apache2 configuration:
Syntax OK
Starting apache2.
Код: Выделить всё
ee /usr/local/www/data/php.php
<?php
phpinfo();
?>
http://192.168.10.1/php.php
смотрим
Код: Выделить всё
Server API CGI/FastCGI
cgi-fcgi
========
cgi-fcgiDirective Local Value Master Value
cgi.check_shebang_line 1 1
cgi.fix_pathinfo 1 1
cgi.force_redirect 1 1
cgi.nph 0 0
cgi.redirect_status_env no value no value
cgi.rfc2616_headers 0 0
fastcgi.logging 1 1

но что-то не доконца настроил, не могу понять, как сделать , чтоб корень открывался нормально , тоесть
просто http://192.168.10.1/ - не пашет.
Понимаю что проблема простая но что-то , не могу осилитьYou don't have permission to access / on this server.
ЗЫ: у кого какие мысли ?