IBM HTTP Server for WebSphere Application Server, V6.1
             操作系统: AIX, HP-UX, Linux, Solaris, Windows, z/OS

             使目录和搜索结果个性化

对 FastCGI 应用程序启用 IBM HTTP Server

FastCGI 应用程序使用 TCP 或 UNIX 套接字与 Web 服务器通信。该可伸缩体系结构使应用程序可以与 Web 服务器运行在同一平台上,或在分散于企业网络中的多台机器上运行。

关于本任务

您可以将 FastCGI 应用程序移植到其他 Web 服务器平台。大多数流行的 Web 服务器可直接或通过商业性扩展来支持 FastCGI。

因为 fastCGI 应用程序的持久性,所以它们运行速度很快。这些应用程序不需要每个请求启动和初始化的开销。此持久性支持应用程序的开发,而这在 CGI 范例(例如,大型 Perl 脚本)或需要连接到一个或多个数据库的应用程序中是不切实际的。

过程

  1. 将 mod_fastcgi 模块装入到服务器中。
    LoadModule fastcgi_module modules/mod_fastcgi.so
  2. 使用 FastCGI 伪指令配置 FastCGI。

示例

[Windows] 在以下配置示例中,c:/Program Files/IBM/HTTPServer/fcgi-bin/ 目录包含 FastCGI echo.exe 应用程序。来自 /fcgi-bin/echo.exe URI 的 Web 浏览器的请求将由 FastCGI echo.exe 应用程序来处理:
LoadModule fastcgi_module modules/mod_fastcgi.so
<IfModule mod_fastcgi.c>
       AllowOverride None
       Options +ExecCGI    
       SetHandler fastcgi-script
</Directory>

FastCGIServer "C:/Program Files/IBM/HTTPServer/fcgi-bin/echo.exe" -processes 1 

</IfModule>
[AIX] [HP-UX] [Linux] [Solaris] [z/OS] 在以下配置示例中,/opt/IBM/HTTPServer/fcgi-bin/ 目录包含 FastCGI 应用程序,包括 echo.exe 应用程序。来自 /fcgi-bin/echo URI 的 Web 浏览器的请求将由 FastCGI echo.exe 应用程序来处理:
LoadModule fastcgi_module modules/mod_fastcgi.so
<IfModule mod_fastcgi.c>
ScriptAlias /fcgi-bin/ "/opt/IBM/HTTPServer/fcgi-bin/"

<Directory "/opt/IBM/HTTPServer/fcgi-bin/"
		  AllowOverride None
       Options +ExecCGI    
       SetHandler fastcgi-script
</Directory>

FastCGIServer "/opt/IBM/HTTPServer/fcgi-bin/echo" -processes 1 
</IfModule>



子主题
了解 FastCGI
FastCGI 伪指令
任务主题    

使用条款 | 反馈

最近更新日期: Mar 31, 2008 3:11:26 AM EDT
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.ihs.doc/info/ihs/ihs/cihs_fcgiapps.html