Map virtual hosts for Web modules

 

+

Search Tips   |   Advanced Search

 

A virtual host must be mapped to each Web module of a deployed application. Web modules can be installed on the same virtual host or dispersed among several virtual hosts.

 

Before you begin

We can map a virtual host to a Web module during or after application installation using the console. This article assumes that the Web module is already installed on a server and that you want to change the mappings.

Before you change a mapping, check the virtual hosts definitions. We can install a Web module on any defined virtual host. To view information on previously defined virtual hosts, click Environment > Virtual Hosts in the administrative console. Virtual hosts enable you to associate a unique port with a module or application. The aliases of a virtual host identify the port numbers defined for that virtual host. A port number specified in a virtual host alias is used in the URL that is used to access artifacts such as servlets and JavaServer Pages (JSP) files in a Web module. For example, the alias myhost:8080 is the host_name:port_number portion of the URL http://myhost:8080/servlet/snoop.

 

Overview

During application installation, a virtual host other than the one you want mapped to your Web module might have been specified.

The default virtual host setting usually is default_host, which provides several port numbers through its aliases:

80

An internal, insecure port used when no port number is specified

9080

An internal port

9443

An external, secure port

Unless you want to isolate your Web module from other modules or resources on the same node (physical machine), default_host is a suitable virtual host for your Web module.

In addition to default_host, WebSphere Application Server provides admin_host, which is the virtual host for the administrative console system application. admin_host is on port 9060. Its secure port is 9043.

Use the Map virtual hosts for Web modules panel of the administrative console to view and change mappings. This panel is displayed during application installation using the console and, after the application is installed, can be accessed from the settings page for an enterprise application.

On the Map virtual hosts for Web modules panel, specify a virtual host for each Web module. Web modules of an application can be installed on the same virtual host or on different virtual hosts.

 

Procedure

  1. Click Applications > Enterprise Applications >appname > Map virtual hosts for Web modules in the console navigation tree. The Select virtual hosts for Web modules - Map virtual hosts for Web modules panel is displayed.

  2. Examine the list of mappings. Ensure that each Web module entry has the desired virtual host mapped to it, identified under Virtual host.

  3. Change the mappings as needed.

    1. Select each Web module that you want mapped to a particular virtual host. In the list of mappings, place a check mark in the Select check boxes beside the Web modules.

    2. From the Virtual host drop-down list, select the desired virtual host. If you selected more than one virtual host in step 1:

      1. Expand Apply Multiple Mappings.

      2. Select the desired virtual host from the Virtual Host drop-down list.

      3. Click Apply.

  4. Repeat steps 2 and 3 until a desired virtual host is mapped to each Web module.

  5. Click OK.

 

Result

The application or Web module configurations are changed. The application or standalone Web module is restarted so the changes take effect.

 

What to do next

Save changes to your administrative configuration.

In the Network Deployment product, the application binaries are transferred to nodes when the configuration changes on the deployment manager synchronize with configurations for individual nodes on which the application will run.

If the application or module is deployed on a cluster and you have no more configuration changes to make, click Rollout Update on the Enterprise Applications page to propagate the changed configuration on all cluster members of the cluster on which the application or module is deployed. Rollout Update sequentially updates the configuration on the nodes that contain cluster members.

 

See also

Select virtual hosts - Map virtual hosts for Web modules settings

 

See Also

Virtual hosts
Why you would use virtual hosting
The default virtual host (default_host)
How requests map to virtual host aliases

 

Related Tasks

Configure an application