# SCGI

The scgi handler allow Cherokee to communicate with SCGI programs.

## Parameters

This module accepts one parameter, and at the same time, supports all the CGI handler parameters:

- Server path or hostname:port: It defines a servers entry
  - Interpreter "path": The parameter Server accepts this subparameter as well

These parameters are also available:

- Scriptalias path: It defines a kind of execution interpreter
- Env variable "value": Set an environment variable for the cgi program
- ErrorHandler [on | off]: Use CGI output as error message

## Examples

    Directory / {
       Handler scgi {
          Server localhost:4001
       }
    }

This configuration would use a SCGI server running on the port 4001 as the default request handler.

    Directory / {
       Handler scgi {
          Server localhost:4002 {
              Interpreter "/usr/lib/scgi/my_app1.py 4002"
          }
       }
    }

Basically it is the same than the previous one, but it will launch a new SCGI server (/usr/lib/scgi/my_app1.py) if it can't contact one on the port 4002.