on 05-15-2014 5:52 PM
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
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 ^/(.*) -
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Assuming you are running a Web Dispatcher version prior to 7.40, SAP note 2006256 has a workaround for older releases.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello James,
Are you using a server port with the ROUTER protocol for your tests?
Regards,
Tobias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.