iTP Secure WebServer System Administrator's Guide (Version 7.0)
Configuring the iTP Secure WebServer
iTP Secure WebServer System Administrator’s Guide—523346-012
7-29
Using Region Directives
•
Using Tcl Variables on page 7-40
•
Allowing Byte Ranges on page 7-43
•
Implementing Multiple-Host Support on page 7-43
Using Region Directives
You control client access to your server by entering commands in a Region directive
in the server configuration file (httpd.config). The Region directive applies these
commands to any requests or classes of requests attempting to access a specified
portion of your server file tree. Such a specified portion of the server file tree is referred
to as a region.
Region directives allow you to limit access to any region on your server. For example,
you might use a Region directive to deny requests from certain hosts, to describe the
security attributes required for certain requests, or to redirect requests to another
location. The region you specify in a Region directive might include all files on the
server, only the files under a certain directory tree, or all files ending with a particular
extension, such as .gif. For example, you could deny access to any request attempting
to access a region on your server such as /admin/*.cgi.
A Region directive consists of a matching pattern and a list of commands to be
applied to any URL that matches the given pattern:
Region pattern {
region_command
.
.
.
}
where:
pattern
is a string that matches the path component of a URL. You specify pattern in a
format similar to that used by UNIX shells: you use path names and wildcards (*).
For example, the pattern * would refer to all files on the server, *.cgi would refer
to files ending with the extension .cgi, and /admin/* would refer to all files under
the /admin directory.
region_command
is a command that constrains access to the matched region.
A typical configuration file contains several Region directives. During request
processing, the server compares the current URL against the pattern in each directive
in the configuration file, beginning with the top directive and proceeding to the bottom.
When a match is found, the server executes, in order, the commands contained in the
matched directive.