When you use virtual servers you can offer companies or individuals domain names, IP addresses, and some server monitoring capabilities with a single installed server. For the users, it is almost as if they have their own web servers, though you provide the hardware and basic web server maintenance.
All virtual servers have an HTTP Listener specified. When a new request comes in, the Server determines which virtual server to send it to based on the configured HTTP Listener.
Server instances can have any number of HTTP Listeners, both secure and non-secure. You can have both IP-address-based and URL-host-based virtual servers.
Every virtual server can (but does not have to) have its own list of ACLs, its own mime.types file, and its own set of Java Web Applications.
This design gives you maximum flexibility to configure the server for a variety of applications. The following examples discuss some of the possible configurations available for Web Server .
After a new installation of the Web Server , you have one server instance. This server instance has just one HTTP Listener listening on the port you selected during installation of any IP address to which your computer is configured.
Some mechanism in your local network establishes a name-to-address mapping for each of the addresses to which your computer is configured. In the following example, the computer has two network interfaces: the loopback interface (the interface that exists even without a network card) on address 127.0.0.1, and an Ethernet interface on address 10.0.0.1.
The name example.com is mapped to 10.0.0.1 via DNS. The HTTP Listener is configured to listen on port 80 on any address to which that machine is configured ("ANY:80" or "0.0.0.0:80").
In this configuration, connections to the following reach the server and are served by virtual server VS1
http://127.0.0.1/ (initiated on example.com)
http://localhost/ (initiated on example.com)
http://example.com/
http://10.0.0.1/
Use this configuration for traditional web server use. You do not need to add additional virtual servers or HTTP Listeners.
See Configuring SSL for the Server.
A more complex configuration of the Web Server is one in which the server hosts a few virtual servers for an intranet deployment. For example, you have three internal sites where employees can look up other users’ phone numbers, look at maps of the campus, and track the status of their requests to the Information Services department. Previously (in this example), these sites were hosted on three different computers that had the names phone.example.com, maps.example.com and is.example.com mapped to them.
To minimize hardware and administrative overhead, you can consolidate all three sites into one web server living on the machine example.com. You could set this up in two ways: using URL-host-based virtual servers or using separate HTTP Listeners. Both have their distinct advantages and disadvantages.
Intranet hosting using URL-host-based virtual servers
While URL-host-based virtual servers are easy to set up, they have the following disadvantages:
Supporting SSL in this configuration requires non-standard setup using wildcard certificates.
URL-host-based virtual servers do not work with legacy HTTP clients.
You can also set up the IP-address-based configuration with one HTTP Listener per address.
Intranet hosting using separate HTTP Listeners
The advantages of IP-address-based virtual servers are:
They work with older clients that do not support the HTTP/1.1 Host header.
Providing SSL support is straightforward.
The disadvantages are:
They require configuration changes on the host computer (configuration of real or virtual network interfaces).
They do not scale to configurations with thousands of virtual servers.
Both configurations require setting up name-to-address mappings for the three names. In the IP-address-based configuration, each name maps to a different address. The host machine must be set up to receive connections on all these addresses. In the URL-host-based configuration, all names can map to the same address, the one the machine had originally.
The configuration with multiple HTTP Listeners may give you a minimal performance gain because the server does not have to find out the address where the request arrived. However, using multiple HTTP Listeners also results in additional overhead (memory and scheduling) because of the additional acceptor threads.
Mass hosting is a configuration in which you enable many low-traffic virtual servers. For example, an ISP that hosts many low-traffic personal home pages would fall into this category.
The virtual servers are usually URL-host-based. For example, you can have one configuration that enables only static content, and another one that enables static content and CGIs.
Create and identify a configuration for which you need to create a virtual server.
Create a HTTP listener.
Identify the host(s) for the new virtual server.
Select the configuration from which you will need to add a virtual server. You can select the configuration from the list of configuration shown in the Configurations tab.
Click on the Virtual Servers tab > New button.
A pop-up wizard page appears to guide you through the Virtual Server configuration process.
From the wizard page, perform the following tasks:
Enter the new virtual server information:
Enter a name to identify the new virtual server. The name can be alphanumeric and can also include period (.), dash (-) and underscore (_) characters.
(Optional) Enter a list of hosts to be added to the new virtual server.
(Optional) Enter the document root for the virtual server.
Select an HTTP listener for the newly configured virtual server. You can either choose an existing HTTP listener or create a new HTTP listener.
The wizard summary page appears. To change the configuration, go back to the previous pages by clicking Previous. Click Finish to complete the new virtual server configuration process.
The Results page appears. If you see any error, Configure the virtual server again by going back to the previous pages in the wizard.
Using CLI
To add a virtual server through CLI, execute the following command:
wadm> create-virtual-server --user=admin --password-file=admin.pwd --host=serverhost --port=8989 --config=config1 --document-root=../docs config1_vs_1 |
See CLI Reference, create-virtual-server(1).
To configure virtual server's general settings, perform the following task:
Select the configuration from the configuration list. Click Configurations tab to get the list of available configurations.
Select the virtual server from the virtual server list. Click Virtual Servers tab to get the available virtual servers for the selected configuration.
Click General tab. Configure the following settings.
Enabled — Whether the virtual server is enabled at runtime.
Document Root — The document root path for the virtual server, where the virtual server's data will be stored. This includes exploded web application directories and log files.
Hosts — You can enter more than one URL host, separated by commas.
To duplicate a virtual server, perform the following task:
Select the configuration from the configuration list. Click the Configurations tab to get the list of available configurations.
Select the virtual server from the virtual server list. Click the Virtual Servers tab to get the available virtual servers for the selected configuration.
Click,Copy and provide a name for the new virtual server.
Using CLI
To duplicate a virtual server through CLI, execute the following command:
wadm> copy-virtual-server --user=admin --password-file=admin.pwd --host=serverhost --port=8989 --config=config1 --vs=config1_vs_1 copiedVs |
copiedVS is the name of the new virtual server.
See CLI Reference, copy-virtual-server(1).
The Server accepts the HTTP requests via an HTTP Listener before forwarding the request to the configured Virtual Server. This page enables you to add and configure HTTP Listeners.
HTTP Listeners must have a unique combination of port number and IP address. You can use either IPv4 or IPv6 addresses. Setting the IP address to “*” creates an HTTP Listener that listens on all IP addresses on that port.
You can create a new HTTP Listener for a Virtual Server for processing incoming HTTP requests performing the following steps:
Click theVirtual Servers tab under Configurations tab.
Click theHTTP Listeners sub tab to view the list of configured HTTP Listeners.
Click theNew button to open a wizard page that creates a new HTTP Listener.
Provide the following information in the wizard page.
Name — Name for the new HTTP Listener.
Port — Port for the HTTP Listener to bind and listen for incoming HTTP requests.
IP Address — A Valid IPv4 or IPv6 address. “*” implies that the HTTP Listener will listen to all IP addressed for the configured port.
Server Name — Enter the server name E.g. sales.mycomp.com
Default Virtual Server — Select the virtual server from the drop-down list. This action will associate the new HTTP Listener for the selected virtual server.
Description (Optional) — Enter a short description for your HTTP Listener.
Using CLI
For creating a HTTP Listener through CLI, execute the following command.
wadm> create-http-listener --user=admin --password-file=admin.pwd --host=serverhost --port=8989 --listener-port=18003 --config=config1 --server-name=config1.com --default-virtual-server-name=config1_vs_1 config1_ls_1 |
See CLI Reference, create-http-listener(1).
You can edit the existing HTTP Listener settings by performing the following tasks:
Click theVirtual Servers tab under a Server Configuration, for editing an existing HTTP Listener setting.
Click the HTTP Listeners sub tab to view the list of configured HTTP Listeners.
Under the Listener Name table column, click the HTTP Listener you need in order to edit its setting.
You can edit both the general and security related settings for the HTTP Listener.
Click the General tab to edit basic and advanced HTTP Listener settings. Configure the following options:
Name — Name for the new HTTP Listener
Port — Port for the HTTP Listener to bind and listen for incoming HTTP requests.
IP Address — A Valid IPv4 or IPv6 address. “*” implies that the HTTP Listener will listen to all IP addressed for the configured port.
Server Name — Enter the server name E.g. sales.mycomp.com
Select the Configure Advanced Settings option under the Advanced section to edit HTTP Listener advanced settings. Configure the following options:
Acceptor Threads — Number of threads dedicated to accept connections received by this listener. Accepted values are 1 to 128.
Protocol Family — The protocol used by the listener. Do not modify this value. Default is HTTP.
Listen Queue Size — Maximum size of the operating system listen queue backlog.
Receive Buffer Size — Size (in bytes) of the operating system socket receive buffer.
Send Buffer Size — Size (in bytes) of the operating system socket send buffer.
Blocking I/O — Determines if the HTTP listener socket is in the blocking mode. Disabled by default.