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 SP8 NSAPI Programmer’s Guide.
For more information about CGI, see the Sun Java System Web Server 6.1 SP8 Administrator’s Guide and the Sun Java System Web Server 6.1 SP8 Programmer’s Guide.
There are three ways to change the timing used to flush the CGI buffer:
Adjust the interval between flushes using the Service parameter.
Adjust the buffer size using the Service parameter.
Force Sun Java System Web Server to flush its buffer by forcing spaces into the buffer in the CGI script.
The following table describes parameters for the send-cgi function.
Table 4–58 send-cgi Parameters
Parameter |
Description |
---|---|
(UNIX only) Specifies the name of the user to execute CGI programs as. |
|
(UNIX only) Specifies the name of the group to execute CGI programs as. |
|
(UNIX only) Specifies the directory to chroot to before execution begins. |
|
(UNIX only) Specifies the directory to chdir to after chroot, but before execution begins. |
|
(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. |
|
(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. |
|
(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. |
|
(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. |
|
(Optional) Common to all Service-class functions. |
|
(Optional) Common to all Service-class functions. |
|
(Optional) Common to all Service-class functions. |
|
(Optional) Common to all Service-class functions. |
|
(Optional) Common to all Service-class functions. |
|
(Optional) Common to all Service-class functions. |
|
(Optional) Common to all Service-class functions. |
|
bucket |
(Optional) Common to all obj.conf functions. |
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 SP8 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>