Enable 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
We 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
- Load the mod_fastcgi module into the server.
LoadModule fastcgi_module modules/mod_fastcgi.so
- Configure FastCGI using the FastCGI directives.
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
:
Example
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>
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 is an interface between Web servers and applications which combines some of the performance characteristics of native Web server modules with the Web server independence of the Common Gateway Interface (CGI) programming interface.
These configuration parameters control the FastCGI feature in IBM HTTP Server.
Related tasks