Sun Java System Web Server 6.1 SP12 FastCGI Plug-in Release Notes

Release Notes for Sun JavaTM System Web Server 6.1 FastCGI Plug-in

These release notes contain important information available at the time of release of Sun Java System Web Server 6.1 FastCGI plug-in, including information about server application functions (SAFs), installation, configuration, technical notes, and pointers to additional resources. Review the release notes prior to installing and configuring your software, and then periodically thereafter for the most up-to-date information.

In addition to the 32–bit platform support, Sun Java System Web Server 6.1 also provides support to 64–bit FastCGI.

The complete Sun Java System Web Server 6.1 SP12 documentation is available at http://docs.sun.com/app/docs/coll/1308.9.

These release notes contain the following sections:

Introduction

FastCGI (http://www.fastcgi.com) is an open extension to CGI (Common Gateway Interface), which is a standard for interfacing external applications with web servers. Like CGI, FastCGI applications run in separate, isolated processes. Some of the FastCGI's advantages are as follows:

The FastCGI plug-in allows the Sun Java System Web Server to safely work with third-party dynamic content generation technologies such as PHP, Perl and Python in a scalable way.

The FastCGI plug-in implements the client side of the FastCGI protocol. This protocol allows producers of dynamic content (and content engines) to implement a common and scalable API that can be utilized by many web servers.

Server Application Functions (SAFs)

The FastCGI plug-in provides the following Server Application Functions (SAFs):

The various parameters and error-reason strings for the FastCGI SAFs are described in the following sections:

auth-fastcgi

The auth-fastcgi SAF is used in a PathCheck directive. This SAF is used to specify the FastCGI server application to be used for authorization.

The auth-fastcgi PathCheck SAF sends the request to the specified Authorizer FastCGI application. If the application has returned a status code of 200, the authorization has succeeded and the Web Server proceeds with request execution. Otherwise, the response that was sent by the FastCGI application is sent back to the user-agent.

The auth-fastcgi SAF is optional and should only be used to forward the requests to an authorizer FastCGI application.

For a list of parameters accepted by auth-fastcgi SAF, see FastCGI SAF Parameters.

The following obj.conf code example demonstrates the use of auth-fastcgi:

PathCheck fn="auth-fastcgi" app-path="/foo/bin/php" bind-path="fooUDS"

On the first request to the auth-fastcgi, FastCGI plug-in creates the FastCGI authorizer application processes and sends the request for evaluation.

responder-fastcgi

The responder-fastcgi SAF forwards a request to a FastCGI application that acts as a Responder, for further processing. responder-fastcgi sends the request data to the listener onto which the app-path application processes are listening. Once the application responds to the request, service-fastcgi process is the response headers before sending them back to the user-agent.

For a list of parameters accepted by responder-fastcgi SAF, see FastCGI SAF Parameters.

The following obj.conf code example demonstrates the use of responder-fastcgi:

Service fn="responder-fastcgi" app-path="/foo/bin/perl" bind-path="fooPerl"

filter-fastcgi

The filter-fastcgi SAF forwards a request to a FastCGI application that acts as a Filter, for further processing. A filter application receives the information associated with an HTTP request plus additional data from a file stored on the server, and generates a filtered version of the data stream as the response.

filter-fastcgi sends the request data in FastCGI record format to the application specified by app-path. Once the application responds to the request, filter-fastcgi process is the response headers before sending them to the user-agent.

For a list of parameters accepted by filter-fastcgi SAF, see FastCGI SAF Parameters.

The following obj.conf code example demonstrates the use of filter-fastcgi:

Service type="magnus-internal/perl" fn="filter-fastcgi" app-path="/foo/bin/perl" bind-path="fooPerl"

error-fastcgi

The error-fastcgi SAF is called when the FastCGI plug-in encounters an error. This is used to display a specified page or URL.

For a list of parameters accepted by error-fastcgi SAF, see FastCGI SAF Parameters.

The following obj.conf snippet demonstrates the use of error-fastcgi:

Error fn="error-fastcgi" error-reason="Fastcgi Connection Error" error-url="http://www.foo.com/errorPage1.html"

FastCGI SAF Parameters

FastCGI plug-in SAFs auth-fastcgi and responder-fastcgi both accept the following parameters unless otherwise mentioned explicitly:


Note –

Parameters chroot, user, group and nice are applicable to only UNIX platforms. On Windows platforms, these parameters are ignored.


The error-fastcgi SAF accepts the following parameters:

FastCGI SAF Error Reason Strings

Here is the list of valid error-reason strings:

Installing the FastCGI plug-in

The FastCGI plug-in is available for use with the Sun Java System Web Server 6.1 or later Service Packs.

This section includes the following topics:

Package Contents

The contents of the platform specific packages are:

Solaris, Linux, AIX:

HP-UX:

Windows:

The FastCGI plug-in is packaged as a tarball, a zip file, an SVR4 package, or an RPM as package.

Installing on Solaris, Linux, HP-UX and AIX Using tar Packaging


$ gzip -d sun-webserver61-fastcgi-{sol|lin|hpux|aix}.tar.gz

;; Uncompress the tar archive,
;; where {sol|lin|hpux|aix} reflects
;; the operating system
;; environment the library will
;; be used

$ tar xvf sun-webserver61-fastcgi-{sol|lin|hpux|aix}.tar

;; Extract the tar archive

Installing on Windows


$ unzip sun-webserver61-fastcgi-win.zip

;; Uncompress the ZIP archive

Installing on Solaris Using SVr4 Packaging


$ su

;; root access is required to install
;; SVr4 packages

$ cd <path/to/package>

;; Change directory to where the package
;; is located

# pkgadd -d .

;; Install SUNWwbsvr-fastcgi.pkg package

Note –

This installation places the shared object and README in /opt/SUNWwbsvr/plug-ins/fastcgi.


Installing on Linux using RPM Packaging


$ su                                   

;; root access is required to
;; install RPM packages

$ cd <path/to/package>

;; Change directory to where
;; the package is located

# rpm -iUvh sun-webserver-fastcgi.rpm

;; Install
;; sun-webserver-fastcgi.rpm
;; package

Note –

This installation places the shared object and README in /opt/sun/webserver/plug-ins/fastcgi.


Please refer to "Configuring the FastCGI plug-in."

Configuring the FastCGI plug-in

The FastCGI plug-in is configured through the existing magnus.conf and obj.conf Web Server configuration files as documented in the following subsections.

magnus.conf

The existing load-modules SAF is used to load the FastCGI plug-in shared object. The shared object filename varies by platform as follows:

The following magnus.conf code example demonstrates the use of load-modules to load the FastCGI plug-in:


Init fn="load-modules" shlib="/opt/SUNWwbsvr/plug-ins/fastcgi/libfastcgi.so"

obj.conf

The FastCGI plug-in introduces the following SAFs that can be referenced in obj.conf:

For example, the following obj.conf code example configures the server to forward requests in the /fcgi/php and /fcgi/perl URI space to fcgi.php and fcgi.perl respectively, this in turn is configured to pass the requests to FastCGI module for further processing.

<Object name="default">
NameTrans fn="assign-name"
from="/fcgi/php(|/*)"
name="fcgi.php"
NameTrans fn="assign-name"
from="/fcgi/perl(|/*)"
name="fcgi.perl"
...
Service type="magnus-internal/perl" fn="filter-fastcgi"\
<other parameters required for running Filter FastCGI processes>
....
</Object>

<Object name="fcgi.php">
PathCheck fn="auth-fastcgi" 
<other parameters required for running Authorizer FastCGI processes>
Service fn="responder-fastcgi" 
<other parameters required for running Responder FastCGI processes>
</Object>

<Object name="fcgi.perl">
PathCheck fn="auth-fastcgi" 
<other parameters required for running Authorizer FastCGI processes>
Service type="magnus-internal/perl" fn="responder-fastcgi" 
<other parameters required for running Responder FastCGI processes>
Error fn="error-fastcgi" error-reason="Fastcgi Connection Error" 
error-url="http://www.foo.com/errorPage1.html"
</Object>

Note –

FastCGI SAFs can be invoked in different ways as mentioned above; that is, defining different Objects for different URL patterns or mapping them to different MIME types.


Known Problems

This section includes the known problems with the Sun Java System Web Server 6.1 FastCGI plug-in.

Table 1 Known Problems in Sun Java System Web Server 6.1 FastCGI plug-in

Problem ID 

Description 

6228687 

(On Linux 2.1 Advanced Server only)caution - Fastcgistub process is restarted when the parent webservd process is killed. 

How to Report Problems and Provide Feedback

If you have problems with Sun Java System Web Server 6.1 FastCGI plug-in, contact Sun customer support using one of the following mechanisms:

Please have the following information available prior to contacting support. This helps to ensure that our support staff can best assist you in resolving problems.

Sun Welcomes Your Comments

Sun is interested in improving its documentation and welcomes your comments and suggestions. To share your comments, go to http://docs.sun.com and click Feedback.

Additional Sun Resources

Useful Sun Java System information can be found at the following locations: