windows下apache2+php5+FastCgi

首先在windows环境下跑apache2+Fastcgi要用到一个组件mod_fastcgi,先下载mod_fastcgi 2.4.2 for Apache 2.0保存到你的apache的modules目录,然后打开http.ini加入以下配置代码(具体的目录设定根据你的实际操作目录做相应的修改):

# FastCGI Module
LoadModule fastcgi_module modules/mod_fastcgi-2.4.2-AP20.dll


FastCgiServer “D:/webServ/php/php-cgi.exe” -processes 3
ScriptAlias “/fcgi-bin/” “D:/webServ/php/”
Action php-fastcgi “/fcgi-bin/php-cgi.exe”
AddType application/x-httpd-php .php

保存http.ini后重起你的apache
以上参数说明如下:
FastCgiServer:php-cgi.exe 所在位置
ScriptAlias :设置一个別名,这个别名实际指向PHP-cgi.exe所在文件夹
Action:建立一个 action 类型,並指定由哪个 CGI 來处理
AddType:这个就不用说了
PS:mod_fastcgi 不能和 php5_module 同时启用,那样的话只会跑FastCgi

2009年4月14日 | 归档于 建站代码

发表评论

XHTML: 您可以使用这些标签: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>