cancel
Showing results for 
Search instead for 
Did you mean: 

Apache Reverse Proxy + SRM Content

Former Member
0 Kudos

Hello,

Server Details:-

Apache 2.0 on Linux.

EP 6.0 SP11 on AIX.

SRM4.0 AIX on AIX.

Apache reverse proxy is configured and working fine with EP but when it request for SRM content, it is giving ERROR.

-


ERROR -


Object not found!

The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster

Error 404

srm.domain.com

Tue 03 May 2005 02:29:16 PM IST

Apache/2.0.40 (Red Hat Linux)

-


-


error_log -


[Tue May 03 13:43:02 2005] [info] Init: Generating temporary DH parameters (512/

1024 bits)

[Tue May 03 13:43:02 2005] [info] Init: Initializing (virtual) servers for SSL

[Tue May 03 13:43:02 2005] [info] Server: Apache/2.0.40, Interface: mod_ssl/2.0.

40, Library: OpenSSL/0.9.7a

[Tue May 03 13:43:02 2005] [notice] Digest: generating secret for digest authent

ication ...

[Tue May 03 13:43:02 2005] [notice] Digest: done

[Tue May 03 13:43:02 2005] [info] mod_unique_id: using ip addr 128.9.16.194

[Tue May 03 13:43:03 2005] [notice] Apache/2.0.40 (Red Hat Linux) configured --

resuming normal operations

[Tue May 03 13:43:03 2005] [info] Server built: Feb 25 2003 05:01:56

[Tue May 03 13:43:19 2005] [error] [client 203.201.222.212] File does not exist:

/var/www/html/sap(bD1lbiZjPTI1OCZkPW1pbiZ3PTc1MDM0NTAr), referer:

http://srm.domain.com/irj/servlet/prt/portal/prteventname/navigate/prtroot/

pcd!3aportal_content!2fcom.domain.content.SAP_CONTENT!2fcom.domain.content.desktop.

SAP_CONTENT_DESKTOP!2fSAP_CONTENT_DESKTOP!2fframeworkPages!2fframeworkpage!2fcom.sap.

portal.innerpage?buildTree=false&NavPathUpdate=false&windowId=WID1115099546171

[Tue May 03 13:43:22 2005] [error] [client 203.201.222.212] File does not exist:

/var/www/html/sap(bD1lbiZjPTI1OCZkPW1pbiZ2PTYlMmU0Jnc9NjY2NTk0MCs=), referer: h

ttp://srm.domain.com/irj/servlet/prt/portal/prtroot/com.sap.portal.dsm.terminator

-


END ERROR LOG -


Can any body guess , what is missing

Sanjeev

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

A common issue with ITS served content through a proxy....

You need Rewrite rule to go along with the Proxy as proxy module doesn't like th "(" in the middle of a URI.

RewriteRule ^/(sap\(.*) http://<fqdn.servername>:<port>/$1 [P,L]

Nick

Former Member
0 Kudos

Hi Nich,

Thanks for your guide line, It is working now.

I am using ProxyPass,ProxyPassReverse and RewriteRule both in apache, does it affect the performance?

well do you have any guide line for Apache reverse proxy tuning

Regards,

Sanjeev

Former Member
0 Kudos

Hi Sanjeev,

good to hear that your configuration works fine. I have some trouble with Portal, BSPs and IACs over Apache Reverse Proxy. Every application works fine in a separate browser session. But if I call i.e. the BSP application from inside the portal nothing happens. Could you explain a little bit more detailed your Apache httpd.conf configuration?

Here are details from my Apache configuration:

RewriteEngine on

ProxyRequests off # geschlossener Proxy

RewriteLog logs/rewrite.log

RewriteLogLevel Debug

ProxyPreserveHost On

ProxyPass /irj http://e8ppt.blf01.telekom.de:50000/irj

ProxyPassReverse /irj http://e8ppt.blf01.telekom.de:50000/irj

ProxyPass /logon http://e8ppt.blf01.telekom.de:50000/logon

ProxyPass /sap http://e8pq4.blf01.telekom.de:8000/sap

ProxyPassReverse /sap http://e8pq4.blf01.telekom.de:8000/sap

RewriteRule ^/(sap.*) http://e8pq4.blf01.telekom.de:8000/$1 [P,L]

RewriteRule ^/(scripts.*) http://e8ppt.blf01.telekom.de:8201/$1 [P,L]

RewriteRule ^/(ejf.*) http://e8ppt.blf01.telekom.de:8201/$1 [P,L]

Best regards,

Gerhard

Former Member
0 Kudos

nothing happens... exactly what is nothing?

Another common problem with proxies is that URL's generated by backend systems point to the backend host directly and not the proxy - so if your backend isn't visable to the client you get errors.

Two solutions - one, setup Apache to also proxy the backend conent and then in your system config provide the hosthame:port of Apache and not the backend system so the EP redirects go to Apache.

Also, there are other params available on the ABAP side to put the proper host into generated URLs that get sent to the client (so all links point to your proxy).

Nick

Former Member
0 Kudos

Hi Nick,

"nothing happens" is probably wrong. The portal J2EE receives the correct request and sends the response. But the client didn't receive this response (the client receives only the first part of the response).

To your answer: I have configured the apache to proxy the backend, too. This is the line RewriteRule ^/(sap.*) ...

When I call the BSP application in a browser session without the portal everything works fine. But when I call the bsp within the portal session I can observe this strange behavior.

Do you have any idea why the bsp doesn't work within the portal?

Best regards

Gerhard

Former Member
0 Kudos

hi Gerhard,

When you try to access the BSP page from EP with Apache Reverse Proxy, Nothing happens means any errors!! is comming??

Are you able to access the BSB pages from EP only.Please check!!!

well Apache setting is below, You can refer

ProxyPass /irj http://abc.domain.com:50000/irj

ProxyPassReverse /irj http://abc.domain.com:50000/irj

ProxyPass /logon http://abc.domain.com:50000/logon

ProxyPassReverse /logon http://abc.domain.com:50000/logon

ProxyPass /sap http://xyz.domain.com:8000/sap

ProxyPassReverse /sap http://xyz.domain.com:8000/sap

RewriteRule ^/(sap\(.*)$ http://xyz.domain.com:8000/$1 [P,L]

Sanjeev

Former Member
0 Kudos

Hi Sanjeev,

thanks for the info about your Apache configuration. I reconfigured my Apache config as yours. Same behavior as before. Do you have made any changes to the J2EE engine of the portal?

It's strangely, when I have a portal session within the intranet anything works fine.

I traced the http traffic in the J2EE engine during the bsp call. I couldn't see the call to the bsp, only portal things like pages and iViews.

Best regards

Gerhard

Former Member
0 Kudos

Hi Gerhard,

Please check the port mapping setting as per link below. It might help you to solve your problem.

http://help.sap.com/saphelp_nw04/helpdata/en/b8/437d46d4451e4c9ab756e272a1581d/frameset.htm

Regards,

Sanjeev

Former Member
0 Kudos

Hello Gerhard and all,

I'm having the same problem you had, and I figured this happens because the backend system (such as SRM) generates an absolute URL referring to my internal URL.

i.e., when I call an internal link, it calls:

http://internal.company.com/sap(unknown externally)

instead of calling:

http://proxy-external.company.com/sap (known externally)

I figured that changing the internal system settings on my Portal to point to my proxy works fine, but I would have all my internal users to go through the firewall to my DMZ, which is not fine...

Any other suggestions? How did you solve your problem then?

Thanks in advance,

Günther

Former Member
0 Kudos

Hello,

When i am using server name in the mapping

ProxyPass /irj http://servername:50000/irj

ProxyPassReverse /irj http://servername:50000/irj

It is showing the EP Login page and it does allow to go inside after login.

But when i am using full domain name, it does not allow the user to logs in, instead the same login page appear.

ProxyPass /irj http://servername.domain.com:50000/irj

ProxyPassReverse /irj http://servername.domain.com:50000/irj

I am guesing this should be the problem i.e domain name resolution.

Any guess!!!!!

Sanjeev