iTP Secure WebServer System Administrators Guide (Version 7.5+)

You can customize this configuration in the following ways:
Enable files other than those that have the .cgi or .pway extension as CGI programs. The
following example specifies that all files that have the extension .pl also have the MIME type
of a CGI application
MimeType application/x-httpd-guardian pl
PathwayMimeMap pl generic-cgi
(The PathwayMimeMap directive is required, as described in “Mapping MIME Types to Server
Classes” (page 143).)
Define an entire directory of CGI programs (such as /cgi-bin/).
To define such a directory, use a DefaultType command in a Region directive. For example,
the directive
Region /cgi-bin/* { DefaultType application/x-httpd-guardian }
specifies that in the directory /cgi-bin/, any file that has no extension should be treated
as a CGI program.
Mapping MIME Types to Server Classes
In the configuration shipped with the iTP Secure WebServer, files that have the extension .cgi are
processed by the generic-CGI server class. The generic-CGI server class launches a CGI process
for each request. The server class uses the NonStop TS/MP Pathsend facility to communicate with
the httpd process but uses a standard NCSA CGI interface to communicate with CGI programs.
Programs that have the extension .pway are treated as NonStop TS/ MP server classes, and the
file name is mapped into a server class name. The server class name consists of the file name
portion of the path as the server class name, excluding the extension. For example, the following
becomes the server class userform:
/usr/tandem/webserver/root/userform.pway
Because the server class uses explicit naming conventions, names of CGI programs that have
.pway extensions must start with an alphabetic character, must be no more than 15 characters in
length, and must be unique to each system.
Also, server class names (unlike OSS file names) are not case sensitive. Check that the names you
specify for CGI processes are unique regardless of case.
You map MIME types to server classes by using the PathwayMimeMap configuration command,
shown in “Server MIME Types (page 143). The example contains the serverMIME types table and
is derived from the table shipped with NCSA's public domain HTTP server. The PathwayMimeMap
directives specify that programs that have the extension .cgi are to be processed by the
generic-CGI server class, and programs that have the extension .ab_demo are to be processed
by server classes defined to the $ZAB PATHMON process. The MimeType and PathwayMimeMap
for server-side includes cause the iTP Secure WebServer to invoke the generic-CGI server class to
process SSI directives that use the exec command to run CGI programs. (For information about
the exec command, see “SSI Directives” (page 131).)
All CGI programs have the MIME type of application/x-httpd-guardian. The other types
in “Server MIME Types” (page 143) have no significance for CGI programs.
Table 15 Server MIME Types
# VERSION=7.2
#
# This file contains the server MIME types table, and is
# derived from the table shipped with NCSA's public domain HTTP
# server.
#
#
# These types enable CGI script processing, imagemaps, and
Configuring for CGI Programs 143