on 09-15-2014 2:30 PM
Hello SAP NW Community,
we need a reverse Proxy to achieve application of different SAP System via Internet. We desided to use web Dispatcher.
The host names of sap systems should not be visible, because of this we create the following URL Rewritting rules.
For example:
AAA, BBB and CCC are sap System SIDs;
"wdisp.company.com" is the FQDN fron webdispatcher
The "icm_filter" Looks like this:
#--------------------------------------------------------------
if% {HTTP_HOST} RegIMatch "wdisp.company.com"[and]
If% {PATH} RegIMatch "AAA"
RegIRewriteUrl ^/AAA/(.*) /$1 [noescape]
SetHeader x-sap-webDisp-target-sid AAA [break]
#---------------------------------------------------------------
the next rules are the same but for BBB and CCC.
The idea is to rewrite in background all URLs such as:
http(s)://wdisp.company.com/AAA/...
to :
http(s)://<FQDN from AAA>/...
The result is always the same: the rewritting for AAA works fine but for BBB and CCC we get -http error 404.
The results are independent from web browser(IE or Firefox).
The http trace Tools- HttpWatch Basis or Firebug show also no rewritting for BBB und CCC.
According the documentation is web Dispatcher able to support many "stateful" and "stateless" connection to different backend sap System.
Do you have any ideas why the rewritting works only for the first sap System?
We tested with different browser and Browser sessions but the resul was the same.
BR,
Rumen
Hi Rumen,
You cannot group multiple rule lines together into one block. So the line
SetHeader x-sap-webDisp-target-sid AAA [break]
does not belong to the preceding if-condition and will always be executed. And because of the [break], no other conditions will be evaluated including the BBB anad CCC conditions.
Anyways, your approach with URL rewriting will likely not work, because the SAP system is constantly generating new URLs, and the system does not know about your little URL prefix scheme and will not insert AAA or BBB into the generated URLs. All generated URLs will not work.
A better solution is to use different ports, as Vagesan already described.
Or as an alternative, you could use different virtual host names e.g. AAA.company.com, BBB.company.com. This is easily achieved by using the latest Web Dispatcher 7.41 and following note 2010948.
Best,
Tobias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tobias,
thanks.
So the URL Rewritting works only in one direction. The incomming URLs(http-reguests) will be convert to internal URLs. But for the way back is the rewritting of the http-requestes not possible.
In our case your proposal should be implemented with external DNS alias. These all should point to the Web Dispatcher and with the following simple rules, should work for each backend SAP system:
if %{HTTP_HOST} regimatch AAA.company.com*
SetHeader x-sap-webdisp-target-sid AAA [break]
if %{HTTP_HOST} regimatch BBB.company.com*
SetHeader x-sap-webdisp-target-sid BBB [break]
Is that right?
BR,
Rumen
Hi,
Instead of PATH , use different pots like this, you can get the URL redirection,
icm_filter.txt :
if %{HTTP_HOST} regimatch wdhost.company.com*
SetHeader x-sap-webdisp-target-sid AAA [break]
if %{HTTP_HOST} regimatch wdhost.company.com*
SetHeader x-sap-webdisp-target-sid BBB [break]
if %{HTTP_HOST} regimatch wdhost.company.com*
SetHeader x-sap-webdisp-target-sid CCC [break]
In Instance profile :
wdisp/system_0 = SID=AAA,MSHOST= AAA.HostNane ,MSPORT=8111
wdisp/system_1 = SID=BBB,MSHOST= BBB.Hostname ,MSPORT=8100
wdisp/system_2 = SID=CCC,MSHOST= CCC.Hostname ,MSPORT=8101
URL :
http://wdhost.company.com:8111 --- goes to AAAhost and so on.
regards
Vagesan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vagesan,
thanks for the quick Response.
your suggestion the communication with each backend system on a unique port is not feasible in our case.
Since the web dispatcher is in DMZ we can not open 50 different ports to 50 different backend Systems.
The web Dispatcher dokumentation in sap.help.com allows our approach.The uniqueness of each incomming request could be achieved by the SID (AAA, BBB, CCC) in the URL.
BR
Rumen
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.