The virtual-server element
Introduction
The virtual-server element represents a virtual host, which is an association of a network name for a server (such as "www.mycompany.com" with the particular server on which Catalina is running. In order to be effective, this name must be registered in the Domain Name Service (DNS) server that manages the Internet domain you belong to - contact your Network Administrator for more information.
In many cases, System Administrators wish to associate more than
one network name (such as www.mycompany.com
and
company.com
) with the same virtual host and applications.
This can be accomplished using the Host
Name Aliases feature discussed below.
One or more virtual-server elements are nested inside an subsystem=web element.
Attributes
Common Attributes
The virtual-server supports the following attributes:
Attribute Description name
Name of the Virtual Host
alias
List of alias supported by the Virtual Host
access-log
Element describing how the access log information should be logged.
rewrite
Element describing what the rewrite valve should do with requests corresponding to the Virtual Host.
enable-welcome-root
Whether or not the bundled welcome directory is used as the root web context.
default-web-module
Webapp to use as default applicationWhether or not the bundled welcome directory is used as the root web context. If not specified, a default of
ROOT.war
is used.
Standard Implementation
virtual-server doesn't support more attributes that the ones listed above.
Nested Components
access-log
access-log
describes how the access log information should be logged. It adds theAccessLogValve
to the Virtual Host defined byvirtual-server
See the AccessLogValve api documentation for more information.
Attribute Description relative-to
directory location based on the global path configuration in the domain model. If not specified, it defaults to the JBoss Application data directory (jboss.server.base.dir).
path
directory location based on the referenced path.
pattern
Patern used by the AccessLogValve. The paterns are described in the AccessLogValve api documentation. If not specified, a default of
common
is used.resolve-hosts
Tell the Valve to resolve or not the host names. If not specified, a default of
false
is used.extended
Used the
ExtendedAccessLogValve
instead theAccessLogValve
If not specified, a default offalse
is used.prefix
Define the prefix to use to name the log file. If not specified, a default of
access_log.
is used.rotate
Tell the valve if it should rotate the ouput or not. If not specified, a default of
true
is used.
rewrite
rewrite
describes how requests should be rewritten before processing. It adds theRewriteValve
to the Virtual Host defined byvirtual-server
See URL Rewriting for more information.
Attribute Description condition
list of
condition
Elements. See condition below.pattern
Pattern is a perl compatible regular expression, which is applied to the URL of the request.
substitution
The substitution of a rewrite rule is the string which is substituted for (or replaces) the original URL which Pattern matched
flags
Substitution options (See URL Rewriting for all the available options
condition
condition
describes a condition of the conditions list to apply the pattern substitution
Attribute Description test
a test string is first evaluated, before being matched against the specified pattern
pattern
CondPattern is the condition pattern, a regular expression which is applied to the current instance of the test string
flags
Matching options AND/OR and NC
sso
sso
describes how single sign on is processed. It adds aValve
to the Virtual Host defined byvirtual-server
Attribute Description cache-container
Name of the cache container to use for clusterised sso
cache-name
Name of the cache to use for clusterised sso
domain
Cookie domain to use.
reauthenticate
Whether each request should cause a reauthentication.