NonStop Servlets for JavaServer Pages (5.0) System Administrator's Guide
Configuring NSJSP
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide—525644-002
3-28
Configuring Virtual Hosting
Configuring Virtual Hosting
The virtual hosting feature enables you to access web services on multiple IP
addresses or hostnames through a single iTP WebServer/NSJSP environment. Each
virtual host can have its own servlet context or a set of servlet contexts. Servlet
contexts cannot be shared across virtual hosts.
In the iTP_server.xml file, the <Host> element represents a virtual host. One or
more <Host> elements are nested inside an <Engine> element. Exactly one of the
Hosts associated with each <Engine> must have a name matching the
defaultHost attribute of that <Engine>. Any context associated with a virtual host
can be defined in the $NSJSP_HOME/conf/NSJSP/<host-name>/ directory.
The <Host> element attributes are described in detail in the Apache Tomcat
documentation at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/index.html.
Configuring Realms
NSJSP allows the use of realms. A realm is a database of user names and passwords
that identify valid users of a web application (or set of web applications), plus a list of
roles associated with each valid user. Roles are similar to groups in Unix-like operating
systems, because access to specific web application resources is granted to all users
possessing a particular role (rather than the list of associated user names). A particular
user can have any number of roles associated with that particular user’s user names.
The following types of storage may be used to contain the realm database:
MemoryRealm
Accesses authentication information stored in an in-memory object collection,
which is initialized from an XML document ($NSJSP_HOME/conf/tomcat-
users.xml).
Example 3-19. Configuring Virtual Hosting
<Host name="www.hp.com" debug="0" appBase="webapps"
unpackWARs="true">
<Alias>hp.com</Alias>
...
</Host>
...
<Host name="nonstop.hp.com" debug="0" appBase="nsk_webapps"
unpackWARs="true">
<Alias>nonstop.compaq.com</Alias>
<Alias>www.tandem.com</Alias>
...
</Host>