NonStop Servlets for JavaServer Pages (NSJSP) 6.1 System Administrator's Guide

Configuring NSJSP
NonStop Servlets for JavaServer Pages (NSJSP) 6.1 System Administrator’s Guide—596210-006
3-74
Configuring Virtual Hosts
Configuring Virtual Hosts
To configure virtual hosts, you must configure multiple Host elements nested as child
elements in the Engine element. The value of the name attribute of each Host is used
by the Engine element to identify where requests should be routed.
When configuring multiple Host elements, it is necessary to have a different appBase
for each Host element and to configure the RequestTrackerValve for each Host.
In many situations, system administrators might want to associate more than one
network name, such as www.hp.com and www.compaq.hp.com with the same host.
This can be accomplished using host name aliases as shown in Example 3-60.
Example 3-60
shows www.compaq.hp.com included as an Alias element, which is
nested as a child element of the Host element where www.hp.com is the network
name.
Note. With the NSJSP Manager, it is possible to manage all applications running on all
the Hosts from a single point of management. For more information, see the NSJSP
Manager Application on page 4-1.
Example 3-60. Configuring Virtual Hosts
<Engine name="NSJSP" defaultHost="localhost">
<Host name="localhost" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false"
xmlNamespaceAware="false"
configClass="com.tandem.servlet.catalina.startup.NSJSPContextConfig">
<Valve className="com.hp.tandem.nsjsp.valves.RequestTrackerValve"/>
</Host>
<Host name="www.hp.com" appBase="hpapps" unpackWARs="true"
autoDeploy="false" xmlValidation="false"
xmlNamespaceAware="false"
configClass="com.tandem.servlet.catalina.startup.NSJSPContextConfig">
<Alias>compaq.hp.com</Alias>
<Valve className="com.hp.tandem.nsjsp.valves.RequestTrackerValve"/>
</Host>
<Host name="internal.hp.com" appBase="internalapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false"
xmlNamespaceAware="false"
configClass="com.tandem.servlet.catalina.startup.NSJSPContextConfig">
<Valve className="com.hp.tandem.nsjsp.valves.RequestTrackerValve"/>
</Host>