return to first page linux journal archive
keywordscontents

Configuring Apache for FastCGI

Configuring Apache for FastCGI isn't all that tricky; the hardest part, in fact, is figuring out which of many options you are going to use.

All the configurations I provide below are based on the example script that accompanies this article. The directory is /fastcgi-bin and the script name is rotate.fcg.

To get Apache to launch the script on the local server, you would use the AppClass directive:

AppClass /fastcgi-bin/rotate.fcg
As indicated in the article, there are four ways to associate a FastCGI script with the FastCGI module. Using AddHandler, you can have the FastCGI module handle all scripts named with the extension .fcg:

AddHandler fastcgi-script fcg
Full descriptions of all your configuration options are included with the FastCGI documentation. There are dozens of other ways to set things up. For a basic configuration, however, that's it. Adding those two lines to httpd.conf or srm.conf is all that is necessary to have your script available for requests of the sort mentioned in the main text.