Example of mod_fastcgi configuration

+

Search Tips   |   Advanced Search

Load the mod_fastcgi module into the server, and then configure FastCGI using the FastCGI directives.

The following directive is required to load mod_fastcgi into the server:

    LoadModule fastcgi_module modules/mod_fastcgi.so

Other directives are then necessary to indicate which requests should be sent to FastCGI applications.

A complete configuration example for Windows operating systems. In this example, the directory...

c:/Program Files/IBM /HTTPServer/fcgi-bin/

... contains FastCGI echo.exe applications. Requests from Web browsers for the URI...

/fcgi-bin/echo.exe

...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>

A complete configuration example for UNIX and Linux platforms. In this example, the directory...

/opt/IBM /HTTPServer/fcgi-bin/

contains FastCGI applications, including the echo.exe application. Requests from Web browsers for the /fcgi-bin/echo URI will be handled by the FastCGI echo.exe 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>