cancel
Showing results for 
Search instead for 
Did you mean: 

Problems reaching ITS trough a Reverse Proxy

Former Member
0 Kudos

Hello,

i have problems reaching a ITS behind a reverse proxy (apache 2).

The reverse proxy is configured according to the "Internet Connectivity to SAP Applications" PDF.

But if i try to display it in an browser i always get the HTTP_NOT_FOUND Error.

The apache server is already working as a reverse proxy for httpsapplications.

For the ITS HTTP connection i added the following lines in the http.conf of the apache:

ProxyRequests Off

ProxyPreserveHost On

RewriteEngine On

RewriteRule /(scripts.*) http://host.company.de:54006/ [P,L]

The its url i want to reach is:

http://host.company.de:54006/scripts/wgate/webgui/!

so i try to open

http://proxy.company.de/scripts/wgate/webgui/!

and in the logs of the apache i can find:

go-ahead with proxy request proxy:http://host.company.de:54006/scripts/wgate/webgui/! [OK]

But in the browser the 404 HTTP Error is displayed.

I am not sure what is wrong. I can connect to the ITS directly with "http://host.company.de:54006/scripts/wgate/webgui/!

"

Maybe anyone else solved this problem in the past.

Best regards,

Nils Kloth

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Nils,

Ok mimes are reached, that's good since proxying is also in place.

(internal host can be resolved, port can be reached, etc)

I guess it has something to do with the:

ProxyPreserveHost On

I do not know the exact behavour but it is preserving the HTTP header "Host" to "host.company.de".

Try without this line to see if there is a response; the follow up urls will not be correct and the cookies will be bound to the false domain, but anyway just to check if this is the cause of the 404.

Or there is special allowance for "/scripts" in your reverse proxy and some checking mechanisme still takes place before the request is proxied.

Normally we reverse proxy in front by:

<VirtualHost externalip:8090>

ProxyPass /scripts/wgate/ http://internalip:80/scripts/wgate/

ProxyPass /sap/its/mimes/ http://internalip:80/sap/its/mimes/

ErrorLog logs/8090error.log

CustomLog logs/8090custom.log common

#LogLevel debug

</VirtualHost>

And fix the HTTP Host and server Port at the wgate

<key name="Header1">

<value name="Name" type="text">http_host</value>

<value name="Set" type="text">1</value>

<value name="Value" type="text">externalip</value>

</key>

<key name="Header2">

<value name="Name" type="text">server_port</value>

<value name="Set" type="text">1</value>

<value name="Value" type="text">8090</value>

</key>

Of course only for the "matching" URL that comes from the reverse proxy; i.e. internal requests are not manipulated and affected.

apache in the background? I.e. you do not know and cannot access that machine?

No it is not necesarry an apache; it could also be an IIS, Iplanet; OS could be Win, Lin and Unix.

You need to check the logs on that backend server to see:

  • if the requests comes in

  • to troubleshoot the "Not Found" error

I do not know if I'm allowed to publish SAP info that way.

Please register there or get someone with a registation to the Marketplace.

You need that access since there are a lot of follow up notes.

http://service.sap.com/notes

Put the notenr in the right left box and "go".

Regards,

Fekke

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Nils,

Rewriting looks OK as seen from the log.

  • what about the <Proxy *> access rights

  • which server is returning the 404 (proxy or backend)

  • What about the ITS mimes (/sap/its/mimes and /designs); did you duplicate them to the proxy or did you define the according ProxyPass rule?

  • Can you reach the "static" mimes e.g. \sap\its\mimes\system_version.txt

There is a working example in Note 838783 together with some notes on "another way" to manipulate the HTTP header variables to run an ITS behind a reverse proxy.

Regards,

Fekke

Former Member
0 Kudos

Hello Fekke,

thank you for your answer. Trying the static mimes was a good idea.

I added a new RewriteRule:

RewriteRule /(sap/its.*) http://host.company.de:54006/$1 [P,L]

Then i opened a picture

http://proxy.company.de/sap/its/mimes/system/theme_saplogo.jpg

And this request was successfull.

So it seems to me that the 404 returning is from my ITS Server. But i can reach the mimes.

Is it right that the ITS works with an apache in the background? Maybe the configuration of this apache is wrong.

Additionally there my ITS Version.

SAP Internet Transaction Server (ITS, Version 6200.1017.50946.0, Build 731021

I can't reach the sapnote 838783. Can you post the text or send it via email?

Thank you,

Nils Kloth