Sun Java System Web Server 6.1 SP11 NSAPI Programmer's Guide

init-cgi

Applicable in Init-class directives.

The init-cgi function performs certain initialization tasks for CGI execution. Two options are provided: timeout of the execution of the CGI script, and establishment of environment variables.

Parameters

The following table describes parameters for the init-cgi function.

Table 2–7 init-cgi parameters

Parameter  

Description  

timeout

(Optional) Specifies how many seconds the server waits for CGI output. If the CGI script has not delivered any output in that many seconds, the server terminates the script. The default is 300 seconds.

cgistub-path

(Optional) Specifies the path to the CGI stub binary. If not specified, Sun Java System Web Server looks in the following directories in the following order, relative to the server instance’s config directory: ../private/Cgistub, then ../../bin/https/bin/Cgistub.

Use the first directory to house an suid Cgistub (that is, a Cgistub owned by root that has the set-user-ID-on-exec bit set). Use the second directory to house a non-suid Cgistub. The second directory is the location used by Sun Java System Web Server 4.x servers.

If present, the ../private directory must be owned by the server user and have permissions d??x------. This prevents other users (for example, users with shell accounts or CGI access) from using Cgistub to set their uid.

For information about installing a suid Cgistub, see the Sun Java System Web Server 6.1 SP11 Programmer’s Guide.

env-variable

(Optional) Specifies the name and value for an environment variable that the server places into the environment for the CGI. You can set any number of environment variables in a single init-cgi function.

Example


Init fn=init-cgi LD_LIBRARY_PATH=/usr/lib;/usr/local/lib