lazarus开发apache下fastcgi应用,如何配置httpd.conf文件
2012-11-26 21:21
531 查看
以lazarus附带的fastcgi例程为例子:
lazarus\fpc\2.6.0\source\packages\fcl-web\examples\helloworld\fcgi,
1、用lz打开并编译,得到helloworld.exe文件;
2、将其复制到Apache2.2\cgi-bin目录,这一步并非必须,只是为了操作方便。
3、下载http://www.fastcgi.com/dist/mod_fastcgi-2.4.6-AP22.dll,复制到Apache2.2\modules目录,并改名为:mod_fastcgi.so。
4、配置httpd.conf文件。
.......
LoadModule fastcgi_module modules/mod_fastcgi.so
......
fastcgiexternalserver "cgi-bin/hello-fastcgi" -host localhost:2015 -idle-timeout 30 -flush
注意此处2015与前面程序helloworld.lpr中端口必须一致:
Application.Port:=2015;
5、重启apache,启动helloworld.exe。
6、浏览器打开地址:
http://localhost/cgi-bin/hello-fastcgi/func1call
第二个配置例子:
......
......
访问:
http://localhost/wind/modleinfo/info
modleinfo:模块名称,info:action名称。
lazarus\fpc\2.6.0\source\packages\fcl-web\examples\helloworld\fcgi,
1、用lz打开并编译,得到helloworld.exe文件;
2、将其复制到Apache2.2\cgi-bin目录,这一步并非必须,只是为了操作方便。
3、下载http://www.fastcgi.com/dist/mod_fastcgi-2.4.6-AP22.dll,复制到Apache2.2\modules目录,并改名为:mod_fastcgi.so。
4、配置httpd.conf文件。
.......
LoadModule fastcgi_module modules/mod_fastcgi.so
......
fastcgiexternalserver "cgi-bin/hello-fastcgi" -host localhost:2015 -idle-timeout 30 -flush
注意此处2015与前面程序helloworld.lpr中端口必须一致:
Application.Port:=2015;
5、重启apache,启动helloworld.exe。
6、浏览器打开地址:
http://localhost/cgi-bin/hello-fastcgi/func1call
第二个配置例子:
......
LoadModule fastcgi_module modules/mod_fastcgi.so
......
<IfModule mod_fastcgi.c> <Directory "D:/apache2.2/cgi-bin/t0115"> Order allow,deny Allow from all </Directory> #External FCGI app, 必须人工启动该程序, Apache 不会启动它 FastCgiExternalServer "D:/apache2.2/cgi-bin/t0115/windweb.exe" -host localhost:8027 -idle-timeout 30 -flush #optionally, to shorten the calling URL and to not display the executable file name (if used, no +ExecCGI is needed above) ScriptAlias /wind "D:/apache2.2/cgi-bin/t0115/windweb.exe" </IfModule>
访问:
http://localhost/wind/modleinfo/info
modleinfo:模块名称,info:action名称。
相关文章推荐
- lazarus开发apache下fastcgi应用,如何配置httpd.conf文件
- Apache主配置文件httpd.conf 详解
- Apache配置文件(httpd.conf)中文说明
- 深入apache配置文件httpd.conf的部分参数说明
- 代码加载Apache 在配置文件httpd.conf加反向代理功能
- APACHE配置文件中文版 httpd.conf FOR Apache 2.2.4
- Apache httpd.conf配置文件 3(虚拟主机)
- Apache配置文件httpd.conf参数注解
- Apache的配置httpd.conf文件配置
- openSUSE 11.3 Apache httpd.conf 文件配置
- Apache配置文件httpd.conf 中文版
- Apache的httpd.conf配置文件详解
- Apache httpd.conf配置文件 1(Global Environment )
- Apache的主配置文件httpd.conf
- Apache服务器主配置文件httpd.conf详解2
- APACHE配置文件中文版 httpd.conf FOR Apache 2.2.4
- Apache配置文件httpd.conf内容翻译
- Apache2.2和Apache2.4中httpd.conf配置文件 权限的异同
- centos apache配置文件httpd.conf
- apache httpd.conf配置文件设置关联php文件