windows下apache+fastcgi+cpp环境搭建

一 下载程序

下载apache

http://httpd.apache.org/

具体地址:http://mirror.esocc.com/apache//httpd/binaries/win32/httpd-2.2.22-win32-x86-no_ssl.msi


下载mod_fcgid

http://httpd.apache.org/mod_fcgid/

具体地址:http://mirror.esocc.com/apache//httpd/binaries/win32/mod_fcgid-2.3.6-win32-x86.zip


下载fcgi开发库

http://www.fastcgi.com

具体地址:http://www.fastcgi.com/dist/fcgi-2.4.1-SNAP-0910052249.tar.gz


二 安装配置

1 安装apache

2 拷贝mod_fcgid到modules目录下

3 编译fcgi的echo-cpp程序,将echo-cpp.exe 和 libfcgi.dll 放到 C:/Apache2.2/fcgi-bin 

4 修改 httpd.conf ,在最后加入

LoadModule fcgid_module modules/mod_fcgid.so

	#AddHandler fcgid-script .fcgi
  
    SetHandler fcgid-script
    #Options Indexes FollowSymLinks Includes ExecCGI
    #Options +ExecCGI
    
    Order allow,deny
    Allow from all
  
  ScriptAlias /myfcgid "C:/Apache2.2/fcgi-bin/echo-cpp.exe"

解释:

C:/Apache2.2/fcgi-bin                           为fcgi程序放置目录

C:/Apache2.2/fcgi-bin/echo-cpp.exe 你的fcgi程序三 启动apache,打开 http://127.0.0.1/myfcgid 看效果

windows下apache+fastcgi+cpp环境搭建_第1张图片

参考资料

http://www.lazarus.freepascal.org/index.php?topic=13312.0

1. mod_fcgid from Apache

1.1 on Windows

1.2 on Linux

2. mod_fastcgi from fastcgi.com

2.1 on Windows

2.1 on Linux

你可能感兴趣的:(windows下apache+fastcgi+cpp环境搭建)