Enabling IBM HTTP Server for FastCGI applications

FastCGI applications use TCP or UNIX sockets to communicate with the Web server. This scalable architecture enables applications to run on the same platform as the Web server, or on many machines scattered across an enterprise network.

About this task

You can port FastCGI applications to other Web server platforms. Most popular Web servers support FastCGI directly, or through commercial extensions.

FastCGI applications run fast because of their persistency. These applications require no per-request startup and initialization overhead. This persistency enables the development of applications, otherwise impractical within the CGI paradigm, like a huge Perl script, or an application requiring a connection to one or more databases.

Procedure

  1. Load the mod_fastcgi module into the server.
    LoadModule fastcgi_module modules/mod_fastcgi.so
  2. Configure FastCGI using the FastCGI directives.

Example

[Windows]In the following configuration example, the c:/Program Files/IBM/HTTPServer/fcgi-bin/ directory contains FastCGI echo.exe applications. Requests from Web browsers for the /fcgi-bin/echo.exe URI will be handled by the FastCGI echo.exe application :
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>
[Linux][AIX][z/OS][HP-UX][Solaris]In the following configuration example, the /opt/IBM/HTTPServer/fcgi-bin/ directory contains FastCGI applications, including the echo application. Requests from Web browsers for the /fcgi-bin/echo URI will be handled by the FastCGI echo application :
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>