!--a11y-->
Virtual Hosts 
The SAP Web Application Server offers you the concept of virtual hosts.
In the SAP system, a virtual host has its own hierarchy of ICF services.
The procedure is explained in the following example.

An SAP Web Application Server is running on the computer with the host name saphost and the IP address 1.2.3.4. The Internet Communication Manager (ICM) is configured so that ports 1080 and 8080 can receive HTTP requests (parameter icm/server_port_<xx>). The computer also responds to the alias myhost. Therefore, both saphost and myhost are mapped to the IP address 1.2.3.4.
You define whether you want there to be different virtual hosts using the profile parameter
is/HTTP/virt_host_<n> = <host1>:port1;<host2>:<port2>;...;
(<n> stands for numbers 0,1,...9). This parameter can be changed statically in the instance profile or dynamically in transaction RZ11. Transaction RZ11 also contains parameter documentation. Note that parameter
is/HTTP/virt_host_0 = *:*;
is set and cannot be changed. Therefore, if no other virtual host is found, the default host number 0 is used. The default host shows up in the HTTP service tree for transaction SICF as default_host. Initially, this is the only virtual server.
To avoid namespace conflicts, all other hosts provided by SAP begin with “SAP”.
To create a new virtual host, take the following steps:
...
1. Call transaction RZ11 and set the parameter is/HTTP/virt_host_1 (for example, to the value myhost:*;).

Note that the dynamic change to the parameter is lost at the next system restart. If you want to set the parameter permanently, you have to set this in the profile file.
2. Call transaction SICF. Choose Virtual Host ® Create, enter a name (for example, virt_host1) and create services or aliases for existing services under this virtual host. Creating a Service describes how this works.
As a test, create a service under virt_host1 called virtping, which uses the same handler as the service bc/pingunder default_host, that is, the HTTP request handler CL_HTTP_EXT_PING.
This means that under the host name myhost on all ports to which the ICM responds (that is, 1080 and 8080), the HTTP service tree under the virtual host is the basis for searches for an appropriate URL path.
Therefore, entering http://myhost:1080/virtping would have the same effect, in this example, as http://saphost:8080/bc/ping.
At this point, however, you can also assign different modes of behavior to the various ping services under the various virtual hosts.
The prerequisites for this are shown in the graphic below:

You can also specify a default service for a virtual host.
As with an internal alias (see Internal Aliases) select a target element from the HTTP service tree. If the URL then specifies the virtual host without any additional path information, the target service that is defined will be called.

For detailed information on the concept underlying virtual hosts, see Virtual Hosts - Advantages.
In the following section, you can read about internal aliases.
