Technical data

8 Configuring WebLogic Server Web Components
8-8 Administration Guide
Configuring Virtual Hosting
Virtual hosting allows you to define host names that servers or clusters respond to.
When you use virtual hosting you use DNS to specify one or more host names that map
to the IP address of a WebLogic Server or cluster and you specify which Web
Applications are served by the virtual host. When used in a cluster, load balancing
allows the most efficient use of your hardware, even if one of the DNS host names
processes more requests than the others.
For example, you can specify that a Web Application called
books responds to
requests for the virtual host name
www.books.com, and that these requests are targeted
to WebLogic Servers A,B and C, while a Web Application called
cars responds to the
virtual host name
www.autos.com and these requests are targeted to WebLogic
Servers D and E. You can configure a variety of combinations of virtual host,
WebLogic Servers, clusters and Web Applications, depending on your application and
Web server requirements.
For each virtual host that you define you can also separately define HTTP parameters
and HTTP access logs. The HTTP parameters and access logs set for a virtual host
override those set for a server. You may specify any number of virtual hosts.
You activate virtual hosting by targeting the virtual host to a server or cluster of
servers. Virtual hosting targeted to a cluster will be applied to all servers in the cluster.
Virtual Hosting and the Default Web Application
You can also designate a default Web Application for each virtual host. The default
Web Application for a virtual host responds to all requests that cannot be resolved to
other Web Applications deployed on same server or cluster as the virtual host.
Unlike other Web Applications, a default Web Application does not use the Web
Application name (also called the context path) as part of the URI used to access
resources in the default Web Application.
For example, if you defined virtual host name
www.mystore.com and targeted it to a
server on which you deployed a Web Application called
shopping, you would access
a JSP called
cart.jsp from the shopping Web Application with the following URI: