The FastCGI plug-in SAFs, "auth-fastcgi“ , “responder-fastcgi” and “filter-fastcgi”, all accept the following parameters unless otherwise mentioned explicitly:
bind-path - (Optional) Can be a UNIX Domain Socket name or Named Pipes or of the form host:port. The description of app-path parameter explains the usage of bind-path parameter.
app-path - (Optional) FastCGI application path that processes the request. The functionality is dependent on the value of the bind-path parameter as follows:
If only app-path is specified, the plug-in creates FastCGI applications that listen to UNIX Domain Sockets or Named Pipes created by the plug-in.
If both app-path and bind-path are specified, the plug-in starts the specified FastCGI application process and binds them to the specified bind-path.
If only bind-path is specified, the FastCGI application is considered to be running remotely and the plug-in will not start the FastCGI application process.
If “app-path“ and “bind-path“ both are not specified, then the plug-in logs an error message.
app-args — (Optional) Values that are passed as arguments to the FastCGI application process. Multiple app-args parameters are allowed. The format for the multiple app-args parameters is app-args="value" app-args="value" ...
app-env - (Optional) Value pairs that are passed as environment variables to the FastCGI application process. Multiple “app-env“ parameters are allowed. The format for multiple app-env parameters is app-env="name=value" app-env="name=value". The existing Web Server environment variables are not passed on to the FastCGI programs. Hence, you should explicitly set the environment variables for FastCGI programs using app-env.
To compile a PHP program, you should ensure that the library files are configured correctly.
For example, if you want to load PHP binaries that you have compiled as a FastCGI application, you need to ensure that all the dependent library files, /usr/local/lib and /usr/local/mysql/lib, are exported to LD_LIBRARY_PATH.
On Windows, app-env="Path=c:/php/lib:c:/mysql/lib"
app-env also enables you to export other environment variables to the PHP applications. You can specify the php.ini file location as the followingapp-env="PHPRC=<directory path>".
While using PHP, you need to provide higher value to PHP_FCGI_CHILDREN and PHP_FCGI_MAX_REQUESTS so that it takes the higher precedence while configuring PHP with FastCGI.
min-procs - (Optional) Integer specifying the minimum number of FastCGI application processes to be created. Defaults to 1.
max-procs - (Optional) Integer specifying the maximum number of FastCGI application processes that can be created at any time. The integer value must be equal to or greater than min-procs. Defaults to 1.
The default value is at present a non-operational parameter. For more information about this issue, seeFastCGI in Sun Java System Web Server 7.0 Update 7 Release Notes.
reuse-connection - (Optional) Boolean value that determines if connections to FastCGI applications are reused. False (0, false, no) indicates that the connections to FastCGI applications are closed after each request. True (1, true, yes) indicates that existing connections are reused for new requests. The default is false. See also connection-timeout.
connection-timeout - (Optional) If “reuse-connection " is set to True, then this value specifies the timeout value in seconds for the pooled connections. If a connection is idle for the specified amount period of time, then the plug-in closes the connection. The default value for this parameter is 5 seconds. See also reuse-connection .
resp-timeout - (Optional) Integer that represents the FastCGI server response timeout in seconds. If there is no response from the FastCGI application within the specified period of time, the request is discarded. The default value for this parameter is 5 minutes.
restart-interval - (Optional) Integer that represents the time interval (in minutes) after which the FastCGI application is restarted. The default value for this parameter is 60 minutes (1 hour). If the value for this parameter is set to zero, the FastCGI application is not forced to restart.
req-retry - (Optional) Integer that represents the number of times the plug-in should resend the request when the FastCGI application rejects the request. The default value for this parameter is zero.
listen-queue - (Optional) Integer specifying the listen queue size for the socket. The default value for this parameter is 256.
rlimit_cpu — Specifies the maximum amount of CPU time (in seconds) to be used by a FastCGI program. You can specify only the current (soft) limit. A maximum (hard) limit is not applicable for this parameter and will be ignored.
Note that parameters chroot, user, group, nice, chdir, rlimit_as, rlimit_core and rlimit_nofile are applicable to UNIX platforms only. On Windows platforms, these parameters are ignored.
chroot - (Optional UNIX only) Used to set the root directory of the chroot FastCGI server application processes.
user - (Optional UNIX only) Specifies the user ID the FastCGI application runs as. Defaults to Web Server's user ID.
group - (Optional UNIX only) The FastCGI application will be running under the specified group. Defaults to Web Server's group.
nice - (Optional UNIX only) Specifies the nice/ priority value of FastCGI application processes.
chdir - (Optional UNIX only) Specifies the directory to chdir to after chroot, but before execution begins.
rlimit_as - (Optional 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 the limits are set to this value.
rlimit_core - (Optional 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 the limits are set to this value.
rlimit_nofile - (Optional 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 the limits are set to this value.
The error-fastcgi Server Application Function (SAF) accepts the following parameters:
error-url - Specifies the page, URI or URL to be displayed in case of if a failure or error occurs. The value of this parameter can be an absolute path, a path relative to docroot, or an URL or URI.
error-reason - (Optional) String that represents the FastCGI protocol error. This string is used to differentiate error URLs to be displayed, in case of any plug-in errors.