8.1 Creating a Virtual Server

When you create a configuration, a virtual server is created automatically with the same name as that of the configuration and is associated with the HTTP listener that was specified while creating the configuration. A default routing rule is also created for the virtual server, to distribute all requests received at the associated HTTP listener to the origin servers that were specified while creating the configuration.

You can create additional virtual servers in a configuration by using either the administration console or the CLI.

Note:

Before You Begin

Before you begin creating a virtual server, decide the following:

  • A unique name for the virtual server. Choose the name carefully; after creating a virtual server, you cannot change its name.

  • One or more unique listen ports. For information about creating listeners, see Chapter 10, "Managing Listeners."

  • The names of the hosts, or the host patterns, for which the virtual server will handle requests.

    When a request is received, Oracle Traffic Director determines the virtual server that should process it, by comparing the Host header in the request with the host patterns defined for each virtual server in the configuration.

    • The request is routed to the first virtual server that has a host pattern matching the Host header in the request.

    • If the Host header in the request does not match the host patterns defined for any of the virtual servers, or if the request does not contain the Host header, the request is routed to the default virtual server that is associated with the HTTP listener through which the request was received.

    Note:

    When Strict SNI Host Matching is enabled for an HTTP listener, and if for that listener at least one of the virtual servers has certificates, then Oracle Traffic Director returns a 403-Forbidden error to the client, if any of the following conditions is true:
    • The client did not send the SNI host extension during the SSL/TLS handshake.

    • The request does not have the Host: header.

    • The host name sent by the client in the SNI host extension during the SSL/TLS handshake does not match the Host: header in the request.

    For more information, see Section 11.2.6, "About Strict SNI Host Matching."

  • The name of the origin-server pool to which the virtual server should forward requests. For information about creating origin-server pools, see Chapter 6, "Managing Origin-Server Pools."

Creating a Virtual Server Using the Administration Console

To create a virtual server by using the administration console, do the following:

  1. Log in to the administration console, as described in Section 2.3.2, "Accessing the Administration Console."

  2. Click the Configurations button that is situated at the upper left corner of the page.

    A list of the available configurations is displayed.

  3. Select the configuration for which you want to create a virtual server.

  4. In the Common Tasks pane, click New Virtual Server.

    The New Virtual Server wizard starts.

    Figure 8-1 New Virtual Server Wizard

    Description of Figure 8-1 follows
    Description of ''Figure 8-1 New Virtual Server Wizard''

  5. Follow the on-screen prompts to complete creation of the virtual server by using the details—listener, origin-server pool, and so on—that you decided earlier.

    After the virtual server is created, the Results screen of the New Virtual Server wizard displays a message confirming successful creation of the virtual server.

  6. Click Close on the Results screen.

    • The details of the virtual server that you just created are displayed on the Virtual Servers page.

    • In addition, the Deployment Pending message is displayed at the top of the main pane. You can either deploy the updated configuration immediately by clicking Deploy Changes, or you can do so later after making further changes, as described in Section 4.3, "Deploying a Configuration."

Creating a Virtual Server Using the CLI

To create a virtual server, run the create-virtual-server command.

For example, the following command creates a virtual server named vs_soa associated with the listener hl1 for the configuration soa.example.com, and configures the virtual server to forward client requests to the origin-server pool soa-pool.

tadm> create-virtual-server --config=soa.example.com --http-listener-name=hl1 --origin-server-pool=soa-pool vs_soa
OTD-70201 Command 'create-virtual-server' ran successfully.

For the updated configuration to take effect, you should deploy it to the Oracle Traffic Director instances by using the deploy-config command.

For more information about create-virtual-server, see the Oracle Traffic Director Command-Line Reference or run the command with the --help option.