一、mod_fcgid配置说明
1、首先下载mod_fcgid-2.3.6-win32-x86.zip,Linux版本的也有:http://httpd.apache.org/download.cgi#mod_fcgid
2、打开apache的配置文件“httpd.conf”,文件最后加入如下配置:
LoadModule fcgid_module modules/mod_fcgid.so
# Where is your php.ini file?
FcgidInitialEnv PHPRC "c:/progra~2/php"AddHandler fcgid-script .php
FcgidWrapper "c:/progra~2/php/php-cgi.exe" .php# 设置PHP_FCGI_MAX_REQUESTS大于或等于FcgidMaxRequestsPerProce
ss,防止php-cgi进程在处理完所有请求前退出
FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000
#php-cgi每个进程的最大请求数
FcgidMaxRequestsPerProcess 1000
#php-cgi最大的进程数
FcgidMaxProcesses 3
#最大执行时间
FcgidIOTimeout 120
FcgidIdleTimeout 120
#php-cgi的路径
FcgidWrapper “D:/Server/PHP/php-5.3.6-nts/php-cgi.exe” .php
AddType application/x-httpd-php .php
3、告诉APACHE执行方式。修改你的配置如下:
<Directory “D:/Web”>
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
4、重启apache。