This module can execute CGI-scripts both from a special directory and on extension basis.

Variables

Allow listing of /cgi-bin/ directory
If set, users can get a listing of all the files in the CGI-bin directory.

CGI-bin path
The location of this module in the namespace of the server. Usually, this is /cgi-bin/ for compability reasons.

CGI-script extensions
All files ending with these extensions, will be parsed as CGI-scripts if the Handle *.cgi variable is set.

Handle *.cgi
If set, the CGI module will treat all files ending with one of the CGI-script extensions as CGI-scripts.

Pass environment variables
If this is set, all environment variables will be passed to CGI scripts, and not only those defined in the CGI/1.1 standard (with spinner CGI enhancements added, if defined). This include LOGNAME and all the other ones. For a quick test, try this script with and without this variable set:
	#!/bin/sh
	echo Content-type: text/plain
	echo
	env

Raw user info
If set the raw, unparsed, user info will be sent to the script, in the HTTP_AUTHORIZATION environment variable.

Run scripts as
If you start Spinner as root, and this variable is set, CGI scripts will be run as this user. You can use either the user name or the UID. Note however, that if you don't have a working user database enabled, only UID's will work correctly. If unset, scripts will be run as nobody.

Search path
This is where the module will find the CGI-binaries.

Send stderr to client
It you set this, standard error from the scripts will be redirected to the client instead of the logs/Debug.1 log

Spinner CGI Enhancements
If set, the module will add a few extra environment variables on it's own, namely:

QUERY_varname
The parsed value of the form variable varname. That is, if you do <input name=name>, and the user types 'J. Random' in that field, the evironment variable QUERY_name will be set to 'J. Random'.

STATE_varname
The parsed value of the state varname. A state is prepended to an URL with the 'add_state' function in the server. If the state variable 'module' is set to 'config.lpc', the environment variable STATE_module will be set to 'config.lpc' as well.

VARIABLES
A space separated list of all variables in the form request, if any.

STATES
A space separated list of all state variables if any.

SUPPORTS_featurename
Set to "Yes" if Spinner thinks the client supports the feature featurename. The feature names are the same as used by the <if supports> tag.

SUPPORTS
A space separated list of all features the client supports.

Use cgi wrapper
If set, a external wrapper will be used to start the CGI script. This will:
  • Enable spinner to send redirects from cgi scripts
  • Work around the fact that stdout is set to nonblocking mode for the script. It simply will _not_ work for most scripts
  • Make scripts run somewhat slower (hardly noticable though).
This should always be used, if you plan to use CGI scripts.

Which wrapper to use
The path to the cgi wrapper binary. This variable is especially useful when you run in a chrooted environment.
the uLPC script module