Apache FastCGI / mod_fastcgi的修改脚本
本节分享的这段shell 脚本可以运行Apache 2.x的mod_fastcgi的。
本例中用到的Apache2.2,在FreeBSD系统中以源代码方式安装。
该脚本在FreeBSD及Debian / RHEL/ CentOS中测试通过。
1,
安装完成后,将php.ini放在cgi-bin目录中,然后设置权限。
配置的mod_fastcgi的httpd.conf如下:
ServerAdmin webmaster@jquerycn.cn
DocumentRoot "/websites/home/jquerycn.cn.com/http"
ServerName jquerycn.cn.com
ServerAlias www.jiaochengji.com.
ErrorLog "/websites/home/jquerycn.cn.logs/error.log"
CustomLog "/websites/home/jquerycn.cn/logs/access.log" common
ScriptAlias /cgi-bin/ "/websites/home/jquerycn.cn/cgi-bin/"
<Directory "/websites/home/jquerycn.cn.com/http">
Options -Indexes FollowSymLinks +ExecCGI
AllowOverride AuthConfig FileInfo
AddHandler php5-fastcgi .php
Action php5-fastcgi /cgi-bin/php.cgi
Order allow,deny
Allow from all
</Directory>
<Directory "/websites/home/jquerycn.cn/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
#SuExecUserGroup jquerycn.cnUser jbxueGroup
</VirtualHost>
2,shell脚本
#
# Apache 2.x中运行 PHP5 中的 mod_fastcgi
### Set PATH ###
PHP_CGI=/usr/local/bin/php-cgi
PHP_FCGI_CHILDREN=4
PHP_FCGI_MAX_REQUESTS=1000
### no editing below ###
export PHP_FCGI_CHILDREN
export PHP_FCGI_MAX_REQUESTS
exec $PHP_CGI
您可能感兴趣的文章:
Apache FastCGI / mod_fastcgi的修改脚本
php fastcgi是什么?fastcgi怎么实现
Gentoo 中配置以 FastCGI 方式运行 php
Ubuntu中安装和配置lighttpd
fastcgi与cgi有什么区别?
对于PHP-FPM参数的理解
lighttpd中配置FastCGI环境
php源码怎么在win运行
PHP fastcgi模式大文件上传500错误
apache伪静态怎么配置?