Sun Java System Web Server 6.1 SP10 Administrator's Configuration File Reference

send-cgi

Applicable in Service-class directives.

The send-cgi function sets up the CGI environment variables, runs a file as a CGI program in a new process, and sends the results to the client.

For more information about the CGI environment variables and their NSAPI equivalents, see the Sun Java System Web Server 6.1 SP10 NSAPI Programmer’s Guide.

For more information about CGI, see the Sun Java System Web Server 6.1 SP10 Administrator’s Guide and the Sun Java System Web Server 6.1 SP10 Programmer’s Guide.

There are three ways to change the timing used to flush the CGI buffer:

Parameters

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

Table 4–59 send-cgi Parameters

Parameter  

Description  

user

(UNIX only) Specifies the name of the user to execute CGI programs as. 

group

(UNIX only) Specifies the name of the group to execute CGI programs as. 

chroot

(UNIX only) Specifies the directory to chroot to before execution begins. 

dir

(UNIX only) Specifies the directory to chdir to after chroot, but before execution begins. 

rlimit_as

(UNIX only) Specifies the maximum CGI program address space in bytes. You can supply both current (soft) and maximum (hard) limits, separated by a comma. The soft limit must be listed first. If only one limit is specified, both limits are set to this value. 

rlimit_core

(UNIX only) Specifies the maximum CGI program core file size. A value of 0 disables writing cores. You can supply both current (soft) and maximum (hard) limits, separated by a comma. The soft limit must be listed first. If only one limit is specified, both limits are set to this value.

rlimit_nofile

(UNIX only) Specifies the maximum number of file descriptors for the CGI program. You can supply both current (soft) and maximum (hard) limits, separated by a comma. The soft limit must be listed first. If only one limit is specified, both limits are set to this value. 

nice

(UNIX only) Accepts an increment that determines the CGI program's priority relative to the server. Typically, the server is running with a nice value of 0 and the nice increment would be between 0 (the CGI program runs at same priority as server) and 19 (the CGI program runs at much lower priority than server). While it is possible to increase the priority of the CGI program above that of the server by specifying a nice increment of -1, this is not recommended.

type

(Optional) Common to all Service-class functions.

method

(Optional) Common to all Service-class functions.

query

(Optional) Common to all Service-class functions.

UseOutputStreamSize

(Optional) Common to all Service-class functions.

flushTimer

(Optional) Common to all Service-class functions.

ChunkedRequestBufferSize

(Optional) Common to all Service-class functions.

ChunkedRequestTimeout

(Optional) Common to all Service-class functions.

bucket

(Optional) Common to all obj.conf functions.

Example

The following example uses variables defined in the server.xml file for the send-cgi parameters. For more information about defining variables, see the Sun Java System Web Server 6.1 SP10 Administrator’s Configuration File Reference.

<Object name="default">
...
NameTrans fn="pfx2dir" from="/cgi-bin" 
dir="/home/foo.com/public_html/cgi-bin" name="cgi"
...
</Object>

<Object name="cgi">
 ObjectType fn="force-type" type="magnus-internal/cgi"
 Service fn="send-cgi" user="$user" group="$group" dir="$dir" 
chroot="$chroot" nice="$nice"
</Object>