“ANÁLISIS DE LA SITUACION ACTUAL”
ESTACIÓN DE TRABAJO ELEMENTO DETALLE
4.4 Modelo de Diagramación
4.4.1 Análisis y Determinación de los Requerimientos.
Another way to configure a server for multiple-host support is to configure a single server process intovirtual hosts, with each virtual host checking for requests on a different IP address or port. Configuring a single server process to support multiple virtual hosts involves:
• Establishing virtual IP addresses, as described in“Establishing Alias IP Addresses” (page 124) • “Setting Up Virtual Hosts” (page 124)
Setting Up Virtual Hosts
You can cause one iTP Secure WebServer to function as multiple servers by setting up multiple virtual hosts. Each virtual host can be configured to check for requests on a different IP address or port and can be mapped to host a specified region on the server.
Create virtual hosts by using theAccept orAcceptSecureTransportdirectives to associate specific IP addresses with specific host names or ports. Then associate content regions with these virtual hosts by usingRegiondirectives, using the-hostor -port arguments.
For example:
Accept -transport /G/ZTC0 -address www.baygroup.org -port 4986 Region -host www.baygroup.org -port 4986 /* {
Filemap / /groups/baygroup/www }
AcceptSecureTransport -transport /G/ZTC0 -address www.nerds.org\ -cert {CN=Open Market Test Certificate MCI-1, OU=Open \
Market,O=MCI, C=US} -port 8080
Region -host www.nerds.org -port 8080 /* {
Filemap / /groups/nerds/www }
You can specify any number of pairings ofAccept(orAcceptSecureTransport) andRegion (with-hostand -portdirectives) in any single configuration file. For further information about theAccept directive, see“Accept” (page 198). For further information about the
AcceptSecureTransportdirective, see“AcceptSecureTransport” (page 200). For further information about theRegiondirective, 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_NAMEvariable, as follows: Region /* {
Filemap//root/$SERVER_NAME/ }
ThisRegion 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_NAMEis the name of the virtual host (IP address). This is the address over which a request is received as specified by the-addressor -name argument to theAcceptdirective. SeeTable 11 (page 120).
Implementing Virtual Hosts for iTP Secure WebServer
In iTP Secure WebServer 7.3 or higher versions, everyRegion command that is used to create a virtual host, might not be associated with anAcceptorAcceptSecureTransportcommand. It is possible to have multipleRegionsusing a singleAcceptorAcceptSecureTransport 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 theRegion –portconfiguration 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 theRegion 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.
Name Based Virtual Hosts are configured usingRegion –hostconfiguration option.
To enable Name Based Virtual Hosting, you must specify a valid DNS name as a parameter for Region –host. If a DNS name is specified as a parameter forRegion –host, string comparisons with the users'Hostvalue would be performed to validate the access. Syntax:
Region –host <hostname> { <region-options>
}
For example:
Region –host hp.com /* {
Filemap / /home/site_data/hp_com }
Region –host nonstop.com /* {
Filemap / /home/site_data/nonstop_com }
In the above example, the Web server serves different content, based on the hostname used for accessing the web portal.
For more information about theRegion directive, see“Region” (page 232). Setting Up IP Based Virtual Hosts
IP Based Virtual Hosts can also be configured using theRegion –hostconfiguration option. However, users must explicitly provide a specific IP address in theRegion –hostto do so. For example:
Region –host 192.168.0.1 /* {
Filemap / /home/site_data/IP_based_content }
This configuration allows access whenever a user accesses the website using the IP address 192.168.0.1, as well as any DNS value which maps to the IP address 192.168.0.1.
For more information about theRegion directive, see“Region” (page 232).
NOTE: Using more than one type of virtual hosting methods together can result in duplicate filemap errors.