一、配置PHP-FastCGI
1、安装
wget http://www.fastcgi.com/dist/mod_fastcgi-2.4.6.tar.gz
tar xzf mod_fastcgi-2.4.6.tar.gz
cd mod_fastcgi-2.4.6
cp Makefile.AP2 Makefile
make top_dir=/usr/local/apache
make top_dir=/usr/local/apache install
2、编辑httpd.conf配置文件,加入fastcgi模块装载代码:
LoadModule fastcgi_module modules/mod_fastcgi.so
3、配置apache支持php
编辑httpd.conf文件,加入如下代码:
### fastcgi ###
ScriptAlias /fcgi-bin/ "/usr/local/php/bin/"
AddHandler php-fastcgi .php
Action php-fastcgi /fcgi-bin/php-cgi
AddType application/x-httpd-php .php
AddHandler fcgid-script. .php .fcgi ### 暂时只配置支持.php
IdleTimeout 300
ProcessLifeTime 1800
MaxProcessCount 100
DefaultMinClassProcessCount 3
DefaultMaxClassProcessCount 8
IPCConnectTimeout 15
<