iTP Secure WebServer System Administrators Guide (Version 7.5+)

The pattern-matching mechanism is the same as that used for file-name expansion in UNIX shells.
Table 34 (page 234) displays some examples.
Table 34 URL Pattern-Matching Examples
DescriptionMatch Pattern
This pattern matches any URL path that begins with the
string /admin/.
/admin/*
This pattern matches any URL path that has the extension
.cgi.
*.cgi
This pattern matches any URL path that has the extension
.gif in or under the images directory.
/images/*.gif
Region Commands
A Region directive controls access by applying one or more special control commands, called
Region commands, to the region on the server that matches the URL path specified in the directive.
The Region commands you can specify are:
AddCGI env-var value
The AddCGI command sets a specified CGI environment variable (env-var) to a default (value)
for all CGI programs in a given region. For example:
Region /* {
AddCGI CGI_LIBRARY /usr/tandem/webserver/lib
}
In this example, environment variable CGI_LIBRARY is set to /usr/tandem/webserver/lib
for all CGI programs within the region /*.
The setting of an AddCGI command has no effect on server objects that are not CGI programs.
For more information about CGI environment variables, see “Using Common Gateway Interface
(CGI) Programs” (page 138).
AllowHost [-noexist] host-pattern...
The AllowHost command returns an "access denied" message if a Web client's host or IP address
does not match one of the specified host patterns (host-pattern...). If the Web client's host
name or IP address does not match, no additional commands within the directive are evaluated.
In specifying a host pattern, you can use the special matching characters listed in Table 33
(page 233).
If you specify the -noexist option, the AllowHost command returns a "not found" message
instead of an "access denied" message.
For example, the command in the following directive restricts access to the /admin/ section of
the server to hosts in the domain company.com:
Region /admin/ {
AllowHost *.company.com
}
DefaultType mime-type
The DefaultType command sets the default MIME type (mime-type) for all files in a given
region. The type specified is returned by the server for any file that does not have a matching
MIME type extension (see “MimeType” (page 224)) or that has no extension. The DefaultType
command overrides the default specified by the DefaultType configuration directive (see
“DefaultType” (page 209)).
For example:
Region /cgi-bin/* {
DefaultType application/x-httpd-guardian
}
234 Configuration Directives