The FastCGI plug-in is configured through the existing magnus.conf and obj.conf Web Server configuration files as documented in the following subsections.
The existing load-modules SAF is used to load the FastCGI plug-in shared object. The shared object filename varies by platform as follows:
libfastcgi.so (Solaris, Linux, AIX)
libfastcgi.sl (HP-UX)
fastcgi.dll (Windows)
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" |
The FastCGI plug-in introduces the following SAFs that can be referenced in obj.conf:
auth-fastcgi
responder-fastcgi
filter-fastcgi
error-fastcgi
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>
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.