cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple internal SAP servers with one Web Dispatcher

0 Kudos

Hello

I am trying to configure Web Dispatcher to send traffic to a different internal server based on the URL entered. I am trying to use 'modification rules' to achieve this.

I have added the following to my profile:

icm/HTTP/mod_0 = PREFIX=/,FILE=C:\usr\sap\WPQ\SYS\profile\icm_filter_rules.txt

wdisp/system_0 = SID=AAA, MSHOST=192.168.1.32, MSPORT=8101

wdisp/system_1 = SID=BBB, MSHOST=192.168.1.31, MSPORT=8101

The contents of icm_filter_rules.txt:

if %{HTTP_HOST} regimatch aaa*

SetHeader x-sap-webdisp-target-sid AAA [break]

if %{HTTP_HOST} regimatch bbb*

SetHeader x-sap-webdisp-target-sid BBB [break]

RegForbiddenUrl ^/(.*) -

The result is that both URLs aaa.domain.com and bbb.domain.com both get routed to the first server, aaa.com / 192.168.1.32. I can't get bbb.domain.com to go to the BBB system / 192.168.1.31!

What could I be doing wrong please?

Cheers

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

I fixed the issue by referencing the http host in a different manner. aaa* doesn't work, but aaa.domain.com does! In other words I had to be specific on the hosts, wildcards don't work for me. I also encapsulated them in double quotes, although I'm not sure whether that made any difference:

if %{HTTP_HOST} regimatch "aaa.domain.com"

SetHeader x-sap-webdisp-target-sid AAA [break]

if %{HTTP_HOST} regimatch "bbb.domain.com"

SetHeader x-sap-webdisp-target-sid BBB [break]

RegForbiddenUrl ^/(.*) -

Not sure if it's a bug that using a wildcard doesn't work?

Anyway it's working how I need it to now, so happy days!

Answers (4)

Answers (4)

0 Kudos

I've noticed the requests always go to whichever system is first in the list in the action file icm_filter_rules.txt.

e.g. with the below file, requests always go to system AAA:

if %{HTTP_HOST} regimatch aaa*

SetHeader x-sap-webdisp-target-sid AAA [break]

if %{HTTP_HOST} regimatch bbb*

SetHeader x-sap-webdisp-target-sid BBB [break]

RegForbiddenUrl ^/(.*) -

With the below file, requestsd always go to BBB:

if %{HTTP_HOST} regimatch bbb*

SetHeader x-sap-webdisp-target-sid BBB [break]

if %{HTTP_HOST} regimatch aaa*

SetHeader x-sap-webdisp-target-sid AAA [break]

RegForbiddenUrl ^/(.*) -

Former Member
0 Kudos

Assuming you are running a Web Dispatcher version prior to 7.40, SAP note 2006256 has a workaround for older releases.

0 Kudos

I'm running release 741, so it shouldn't be affected by that bug, but I tried the workaround anyway (change the spelling of the header field to uppercase in the rewrite file.) but this didn't fix the issue unfortunately.

Former Member
0 Kudos

Hi James,

I would request you to go through SAP library topic about this type of configuration and one discussion topic very similar to your case. Please go through both of them and then try to configure. If it does not work, we will check again. Thanks.

SAP Web Dispatcher for Multiple Systems - SAP Web Dispatcher - SAP Library

Let me know if it helps.

Regards,

Sujit Kumar Banerjee.

0 Kudos

Hello James,

Are you using a server port with the ROUTER protocol for your tests?

Regards,

Tobias

0 Kudos

Hi Tobias,

I'm not sure what you mean by router protocol I'm afraid, can you elaborate please? To test I've modified my local hosts file to point aaa.domain.com and bbb.domain.com to the IP address of the Web Dispatcher server. Then I'm attempting to open a URL on both servers.

Cheers,

James