E2E SAP RESTifier 2.0Since SAP RESTifier version 2.0, the proxy must change the base href in all HTML files, if you run the RESTifier behind a transparent proxy. For earlier versions of the RESTifier, this is not necessary, because they have relative URLs.

In the HTML file you have the href attribute of the base tag:

<base href="/">

You have to add your proxy URI path prefix here. If your proxy has e.g. the URI path prefix /saprestifier, the proxy has to change the base tag to:

<base href="/saprestifier ">

Configuring your Apache proxy, you can use the following rule to add the prefix:

AddOutputFilterByType SUBSTITUTE text/html
Substitute "s|<base href=\"/\">|<base href=\"/saprestifier/\">|i"

Example Apache Configuration

Find below an example Apache configuration for two parallel SAP RESTifier installations:

LoadModule alias_module modules/mod_alias.so
LoadModule filter_module modules/mod_filter.so
LoadModule substitute_module modules/mod_substitute.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule auth_basic_module modules/mod_auth_basic.so

Listen 0.0.0.0:443
<VirtualHost 0.0.0.0:443>
DocumentRoot "/opt/bridge/data/proxies/htdocs" 

SSLEngine On
SSLCertificateFile "/opt/bridge/data/proxies/conf/services.e2ebridge.com_cert.pem"
SSLCertificateKeyFile "/opt/bridge/data/proxies/conf/services.e2ebridge.com_key.pem"

RedirectMatch ^/saprestifier$ /saprestifier/
ProxyPass /saprestifier/ http://sap.e2e.ch/
ProxyPassReverse /saprestifier/ http://sap.e2e.ch/ 

<Location /saprestifier>
AddOutputFilterByType SUBSTITUTE text/html
Substitute "s|<base href=\"/\">|<base href=\"/saprestifier/\">|i" 


# Example for basic authentication with file base user storage
AuthType Basic
AuthName "RESTifier for SAP"
AuthBasicProvider file
AuthUserFile "/opt/bridge/data/proxies/sap.auth"
Require valid-user
</Location>
</VirtualHost>
On this Page:

  • No labels