iTP Secure WebServer System Administrators Guide (Version 7.5+)

Filemap / /groups/nerds/www
}
You can specify any number of pairings of Accept (or AcceptSecureTransport) and Region
(with -host and -portdirectives) in any single configuration file. For further information about
the Accept directive, see Accept” (page 198). For further information about the
AcceptSecureTransport directive, see AcceptSecureTransport” (page 200). For further
information about the Region directive, see “Region” (page 232).
If you are configuring hundreds or even thousands of virtual hosts, you could efficiently vary the
filemap (and any of several other configuration items) for each virtual host by using the
SERVER_NAME variable, as follows:
Region /* {
Filemap//root/$SERVER_NAME/
}
This Region directive maps the root of each virtual host to its own named directory in /root.
If you have a host machine configured with 256 individual IP addresses, you can specify:
Accept -port 80
to accept connections on port 80 for all 256 IP addresses. You could then specify the following:
Region /* {
Filemap / /root/$SERVER_NAME/
}
to configure a total of 256 virtual hosts, where $SERVER_NAME is the name of the virtual host (IP
address). This is the address over which a request is received as specified by the -address or
-name argument to the Accept directive. See Table 11 (page 120).
Implementing Virtual Hosts for iTP Secure WebServer
In iTP Secure WebServer 7.3 or higher versions, every Region command that is used to create
a virtual host, might not be associated with an Accept or AcceptSecureTransport command.
It is possible to have multiple Regions using a single Accept or AcceptSecureTransport
directive. However, you must make sure that the iTP Secure WebServer is configured to accept
requests on an address or port configured for a virtual host.
iTP Secure WebServer supports the following types of virtual host settings:
“Setting Up Port Based Virtual Hosts” (page 125)
“Setting Up Name Based Virtual Hosts” (page 125)
“Setting Up IP Based Virtual Hosts” (page 126)
Setting Up Port Based Virtual Hosts
Port Based Virtual Hosts can be configured using the Region port configuration option.
For example:
Region port 80 /* {
Filemap / /home/site_data/port_80_content
}
This configuration allows access whenever a user accesses the web portal through server port 80
irrespective of the server address used for the access.
For more information about the Region directive, see “Region” (page 232).
Setting Up Name Based Virtual Hosts
In this method, the differentiation between the hosts is carried out based on the Domain Name
Server (DNS) name used by the client to access the web portal. To identify the DNS used, webserver
uses the HTTP request header Host.
Controlling Access to the Server 125