iTP Secure WebServer System Administrator's Guide (iTPWebSvr 6.0+)

Using Common Gateway Interface (CGI) Programs
iTP Secure WebServer System Administrator’s Guide523346-002
8-6
Configuring for CGI Programs
CGI programs can be located in a common directory that includes HTML documents
and graphics files. CGI executables are conventionally labeled with the extension
.cgi. Pathway CGI applications usually have the extension .pway. You can override
these conventions by defining other extensions in the MIME-types configuration file, as
described in MIME Types on page 8-6.
Configuring for CGI Programs
Under many circumstances, there is no need to configure the iTP Secure WebServer
to use CGI programs. The configuration file provided with the iTP Secure WebServer
defines any file that has a .cgi extension as a CGI program to be handled by the
generic-CGI server class. CGI files can reside in any directory, including the same
directory as HTML documents, image files, and other objects.
To customize the handling of CGI programs or to create a new Pathway CGI
application, you should understand several aspects of configuration:
MIME Types on page 8-6
Mapping MIME Types to Server Classes on page 8-7
Server Class Configuration on page 8-10
Program Access Restrictions on page 8-11
MIME Types
The two MIME types, cgi and pway, are interpreted as CGI programs by the CGI
interface as shipped. These two MIME types are defined in the conf/mime-
types.config file, which is sourced in by httpd.config.
The MIME type of a file is defined by the MimeType directive. The MIME types for
generic and Pathway CGI applications, respectively, are
MimeType application/x-httpd-guardian cgi
MimeType application/x-httpd-guardian pway
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 on page 8-7.)