Sun GlassFish Enterprise Server v3 Prelude Developer's Guide

Virtual Servers

A virtual server, also called a virtual host, is a virtual web server that serves content targeted for a specific URL. Multiple virtual servers can serve content using the same or different host names, port numbers, or IP addresses. The HTTP service directs incoming web requests to different virtual servers based on the URL.

When you first install the Enterprise Server, a default virtual server is created. You can also assign a default virtual server to each new HTTP listener you create.

Web applications can be assigned to virtual servers during deployment. A web module can be assigned to more than one virtual server, and a virtual server can have more than one web module assigned to it.

If you deploy a web application and don't specify any assigned virtual servers, the web application is assigned to all currently defined virtual servers. If you then create additional virtual servers and want to assign existing web applications to them, you must redeploy the web applications. For more information about deployment, see the Sun GlassFish Enterprise Server v3 Prelude Application Deployment Guide.

For more information about virtual servers, see virtual-server in Sun GlassFish Enterprise Server v3 Prelude Administration Reference.

ProcedureTo Assign a Default Virtual Server

  1. In the Administration Console, open the HTTP Service component under the relevant configuration.

  2. Open the HTTP Listeners component under the HTTP Service component.

  3. Select or create a new HTTP listener.

  4. Select from the Default Virtual Server drop-down list.

    For more information, see Default Web Modules.

See Also

For details, click the Help button in the Administration Console from the HTTP Listeners page.

ProcedureTo Assign Virtual Servers

  1. Deploy the application or web module and assign the desired virtual servers to it.

    For more information, see Sun GlassFish Enterprise Server v3 Prelude Application Deployment Guide.

  2. In the Administration Console, open the HTTP Service component under the relevant configuration.

  3. Open the Virtual Servers component under the HTTP Service component.

  4. Select the virtual server to which you want to assign a default web module.

  5. Select the application or web module from the Default Web Module drop-down list.

    For more information, see Default Web Modules.

See Also

For details, click the Help button in the Administration Console from the Virtual Servers page.