Network Deployment (Distributed operating systems), v8.0 > Set up the application serving environment > Administer application servers


Configure virtual hosts


Overview

Virtual hosts let you manage a single application server on a single machine as if the application server were multiple application servers each on their own host machine.

We can separate and control which resources are available for client requests by combining multiple host machines into a single virtual host, or by assigning host machines to different virtual hosts.

If your external HTTP server configuration uses the default port, 9080, you do not have to perform these steps.

Virtual hosts isolate and independently manage multiple sets of resources on the same physical machine. Resources associated with one virtual host cannot share data with resources associated with another virtual host. This is true even though the virtual hosts share the same application server on the same physical machine.

For example, suppose that:

Because the servlet is associated with a virtual host instead of the actual DNS address, The servlet on virtual host VirtualHost1 does not share its context with the servlet that has the same name on virtual host VirtualHost2. Requests for the servlet on VirtualHost1 can continue as usual, even though VirtualHost2 is refusing to fill requests for the servlet with the same name.

If any of the following conditions exist, update the HTTP port numbers associated with the default virtual host. or define a new virtual host and associate it with the ports your HTTP server configuration uses:

If you define new virtual host aliases, identify the port values that the aliases use on the Host alias settings page in the administrative console.


Configure virtual hosts

  1. In the admin console, click...

      Environment | Virtual hosts

  2. If you create a new virtual host, a default set of 90 MIME entries are automatically created for that virtual host.

    1. In the admin console, click New.

    2. The new virtual host and click OK. The new virtual host appears in the list of virtual hosts you can configure.

  3. Select the virtual host whose configuration to change.

  4. Under Additional Properties, click Host aliases.

  5. Create new host aliases or update existing host aliases to associate each of your HTTP port numbers with this virtual host.

    There must be a virtual host alias corresponding to each port your HTTP server configuration uses. There is one HTTP port associated with each web container, and it is usually assigned to the virtual host named default_host. We can change the default assignment to any valid virtual host.

    The host aliases associated with the default_host virtual host are set to * when you install the product. The * (an asterisk) indicates that the alias name does not have to be specified or that any name can be specified.

    When the URL for the application is entered into a web browser, the port number is included. For example, if 9082 is the port number, the specified URL might look like the following:

      http://localhost:9082/wlm/SimpleServlet

    To create a new host alias:

    1. Click New.

    2. Specify a host alias name in the Host Name field and one of your HTTP ports in the Port field.

      We can specify * (an asterisk) for the alias name if you do not want to require the specification of the alias name or to allow any name to be specified.

    3. Click OK and Save to save the configuration change.

    To update an existing host alias:

    1. Select an existing host alias name.

    2. Change the value specified in the Port field to one of your HTTP ports.

    3. Click OK and Save to save the configuration change.

    Optionally you can define a MIME object type and its file name extension if you require a MIME type other than the pre-defined types.

    1. For each needed MIME entry on the MIME type collection page, click New.

    2. On the MIME type settings page, specify a MIME type and extension.

    3. Click OK and Save to save the configuration change.

  6. Regenerate the web server plug-in configuration.

      Servers | Server Types | Web servers | web server | Generate plug-in | Propagate plug-in

  7. Restart the application server.


Related

Virtual host collection
Virtual hosts
Export enterprise applications

+

Search Tips   |   Advanced Search