Oracle GlassFish Server 3.0.1 Administration Guide

ProcedureTo Create a Virtual Server

By default, when GlassFish Server starts, the following virtual servers are started automatically:

In a production environment, additional virtual servers provide hosting facilities for users and customers so that each appears to have its own web server, even though there is only one physical server.

Use the create-virtual-server subcommand in remote mode to create the named virtual server.

Before You Begin

A virtual server must specify an existing HTTP listener. Because the virtual server cannot specify an HTTP listener that is already being used by another virtual server, create at least one HTTP listener before creating a new virtual server.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Create a virtual server by using the create-virtual-server(1) subcommand.

    Information about properties for this subcommand is included in this help page.

  3. To apply your changes, restart GlassFish Server.

    See To Restart a Domain.

Example 16–16 Creating a Virtual Server

This example creates a virtual server named sampleServer on localhost.

asadmin> create-virtual-server sampleServer
Command create-virtual-server executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help create-virutal-server at the command line.