iTP Secure WebServer System Administrators Guide (Version 7.5+)

Returning output
See “Returning Output” (page 156)
Logging errors
See “Logging Error Information” (page 158)
The CGI standard file environment
See “CGIStandard File Environment” (page 159)
If you plan to use Pathway CGI, you should also be aware of a the coding considerations described
in “Pathway CGI Coding Considerations” (page 161).
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” (page 142).
Configuring for CGI Programs
Under many circumstances, you do not have to configure the iTP Secure WebServer to useCGI
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” (page 142)
“Mapping MIME Types to Server Classes” (page 143)
“Server Class Configuration” (page 145)
“Program Access Restrictions” (page 146)
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
142 Using Common Gateway Interface (CGI) Programs