Handler: FastCGI

The fcgi handler makes queries to FastCGI servers, such as PHP, Ruby on Rails or Django in order to get the request response. FastCGI is scalable and language independent enhancement to CGI that provides high performance without limitations of server specific APIs and reduced overhead. It is basically the same thing as CGI but much faster.

This module accepts all the general CGI parameters. It needs a balancer to be configured besides that. It is the piece of configuration that points to the handler where to find the FastCGI servers.

For most of the cases there will be only one FastCGI server though. In that scenario the way to go would be to configure the handler to use a Round Robin balancer and configure a single host or interpreter (it has no performance penalty).


To set up the general gateway options, read about the common parameters shared with the Common CGI options handler. All of them apply with the exception of Check file, which will only be present if the manager is handling an extension. Be sure to understand what that parameter does. It is explained in detail among the rest of CGI options, and depending of how you are using FastCGI it can make all the difference between succeeding and failing to run your application.

To set up the FastCGI specifics, read the Balancers section for general information and the information sources section for more details.


Refer to the Cookbook if you want specific examples on how to configure this handler. The recipe about setting up PHP is a good starting point.

FastCGI Interface