In some very simple scenarios it is possible to access a system using virtual hosting (like HCP) through Web Dispatcher.
It can be done by configuring wdisp/system with sub parameter EXTSRV. Usually two configurations are necessary:
- Configure wdisp/system with sub parameter PROXY if access to the system requires using a proxy.
- Configure Web Dispatcher to change the hostname which is used to address the system. In technical terms it is necessary to configure the Web Dispatcher modification handler to change the HTTP host header.
The required change of the HTTP host header is also the cause for the severe limitations of the scenario:
On the one hand, it is necessary to change the HTTP host header, because systems using virtual hosting typically use the host header to determine the desired application, and are unable to handle requests containing an unknown hostname (the system does not know the Web Dispatcher hostname)
On the other hand, modifying the HTTP host header in the HTTP request can be insufficient, when the system uses the hostname for generation of followup URLs, or for issuing cookies.
The following example illustrates a scenario where changing the hostname (HTTP host header) in Web Dispatcher might not work:
Direct access works:
Browser = https://example.neo.ondemand.com ==> Neo system
Access using Web Dispatcher is broken when single origin access is required:
Since Web Dispatcher does not rewrite HTTP responses, followup URLs contained in the HTTP response would address the Neo system directly, and are no longer sent to Web Dispatcher.
In addition to the functional restrictions the configuration also has security implications described in SAP note 1971571.
In simple scenarios (no followup URL generation, no cookies with explicit domain specification), the scenario works, and can be configured as follows:
In the Web Dispatcher profile, configure a wdisp/system parameter with EXTSRV, and PROXY (if required). For example:
In the Web Dispatcher profile, configure a modification handler:
In the modification file rules.txt add a rule to change the host header: