iTP Secure WebServer System Administrator's Guide (iTPWebSvr 5.1+)
Using Common Gateway Interface (CGI) Programs
iTP Secure WebServer System Administrator’s Guide—522659-001
8-7
Mapping MIME Types to Server Classes
•
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 case-insensitive. Make sure 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 Example 8-1 on page 8-8. The example contains the server MIME
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
on page 7-50.)
All CGI programs have the MIME type of
application/x-httpd-guardian. The
other types in Example 8-1 have no significance for CGI programs.