Configuring the SAP Web Dispatcher / Message Server for Virtual Hosts

Context

If you are working with virtual hosts in the Internet Communication Framework, you can configure the system so that a request to a specific virtual host, which is maintained in transaction SICF, is forwarded.

Procedure


  1. In the profiles of the application servers set the virtual hosts using the parameters is/HTTP/virt_host_<xx> and is/SMTP/virt_host_<xx>, whereby <xx> is the index of the virtual host.

  2. Configure the component that is responsible for load balancing. This is normally the SAP Web Dispatcher, but it could also be the Message Server. Specify that incoming requests to a service (port) are to be forwarded to the appropriate virtual host index on an application server.

    The parameter for this setting is icm/server_port_<xx>=....,VHOSTIDX=<i>.

    If VHOSTIDX=<i> is defined, incoming requests on this service are forwarded to an application server that has a service actively running for the virtual host with the index <i>.

    The parameter for the virtual host 0 should always be set:

    is/HTTP/virt_host_0 = *:*;

    Therefore VHOSTIDX=0 can also be omitted. In this case all HTTP ports are possible targets for the request.

Example

The example below shows the interaction of the parameters in the profiles of the different components.

Component

Profile Settings

Application server 1 (AS1)

icm/server_port_0 = PROT=HTTP,PORT=80

icm/server_port_1 = PROT=HTTP,PORT=1080

icm/server_port_2 = PROT=HTTP,PORT=8080

icm/server_port_3 = PROT=HTTP,PORT=10000

is/HTTP/virt_host_0 = *:*;

is/HTTP/virt_host_1 = *:1080;

is/HTTP/virt_host_2 = *:8080;*:10000;

Application server 2 (AS2)

icm/server_port_0 = PROT=HTTP,PORT=80

icm/server_port_1 = PROT=HTTP,PORT=1080

is/HTTP/virt_host_0 = *:*;

is/HTTP/virt_host_1 = *:1080;

Application server 3 (AS3)

icm/server_port_0 = PROT=HTTP,PORT=80

is/HTTP/virt_host_0 = *:*;

SAP Web Dispatcher

icm/server_port_0 = PROT=HTTP,PORT=1000, VHOSTIDX=1

icm/server_port_1 = PROT=HTTP,PORT=1001, VHOSTIDX=2

icm/server_port_2 = PROT=HTTP,PORT=1002

Incoming requests on the SAP Web Dispatcher can be distributed to the application servers in the following way:

Web Dispatcher Port Where Request Enters

Possible Application Servers/Ports

1000

AS1:1080

AS2:1080

1001

AS1:8080, AS1:10000

1002

AS1:80, AS1:1080, AS1:8080, AS1:10000

AS2:80, AS2: 1080

AS3:80