A virtual server, sometimes called a virtual host, is an object that allows the same physical server to host multiple Internet domain names. All virtual servers hosted on the same physical server share the IP address of that physical server. A virtual server associates a domain name for a server (such as www.aaa.com) with the particular server on which Enterprise Server is running. Each virtual server must be registered with the DNS server for your network.
Do not confuse an Internet domain with the administrative domain of Enterprise Server.
For example, assume that you want to host the following domains on your physical server: www.aaa.com, www.bbb.com, and www.ccc.com. Assume that these domains are respectively associated with web modules web1, web2, and web3. This means that the following URLs are handled by your physical server:
http://www.aaa.com:8080/web1 http://www.bbb.com:8080/web2 http://www.ccc.com:8080/web3
The first URL is mapped to virtual server www.aaa.com, the second URL is mapped to virtual server www.bbb.com, and the third is mapped to virtual server www.ccc.com. For this mapping to work, www.aaa.com, www.bbb.com, and www.ccc.com must all resolve to your physical server’s IP address and each virtual server must be registered with the DNS server for your network.
By default, when Enterprise Server starts, the following virtual servers are started automatically:
A virtual server named server, which hosts all user-defined web modules.
For development, testing, and deployment of web services in a non-production environment, server is often the only virtual server required.
A virtual server named __asadmin, which hosts all administration-related web modules (specifically, the Administration Console). This server is restricted, which means that you cannot deploy web modules to this virtual server.
The following tasks are used to administer virtual servers:
The remote create-virtual-server command enables you to create the named virtual server.
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.
Ensure that the server is running.
Remote commands require a running server.
Create a virtual server by using the create-virtual-server(1) command.
To apply your changes, restart Enterprise Server.
Stop Enterprise Server.
For instructions, see To Stop a Domain (or Server).
Start Enterprise Server.
For instructions, see To Start a Domain (or Server).
The following example command creates a virtual server named sampleServer for hosts pigeon and localhost:
asadmin create-virtual-server --hosts pigeon,localhost sampleServer |
Information similar to the following is displayed:
Command create-virtual-server executed successfully. |
To see the full syntax and options of the command, type asadmin create-virutal-server --help at the command line.
The remote list-virtual-servers command enables you to list the existing virtual servers.
Ensure that the server is running.
Remote commands require a running server.
List virtual servers by using the list-virtual-servers(1) command.
The following example command lists the virtual servers for localhost:
asaadmin list-virtual-servers |
Information similar to the following is displayed:
sampleListener admin-listener http-listener-2 http-listener-1 Command list-http-listeners executed successfully. |
To see the full syntax and options of the command, type asadmin list-virutal-servers --help at the command line.
The remote delete-virtual-server command enables you to delete an existing virtual server.
Ensure that the server is running.
Remote commands require a running server.
Obtain the exact name of the virtual server that you are deleting.
To list the existing virtual servers:
asadmin list-virtual-servers |
If necessary, notify users that the virtual server is being deleted.
Delete a virtual server by using the delete-virtual-server(1) command.
To apply your changes, restart Enterprise Server.
Stop Enterprise Server.
For instructions, see To Stop a Domain (or Server).
Start Enterprise Server.
For instructions, see To Start a Domain (or Server).
The following example command deletes the virtual server named sampleServer from localhost:
asadmin delete-virtual-server sampleServer |
Information similar to the following is displayed:
Command delete-virtual-server executed successfully. |
To see the full syntax and options of the command, type asadmin delete-virutal-server --help at the command line.