You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

On this Page:

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:

Listen 0.0.0.0:443
<VirtualHost 0.0.0.0:443>
  ServerName services.e2ebridge.com
  ServerAlias services.e2ebridge.com
  DocumentRoot "/opt/e2ebridge/5.0/data/proxies/htdocs/443"
  SSLEngine On
  SSLCertificateFile "/opt/e2ebridge/5.0/data/proxies/conf/services.e2ebridge.com_cert.pem"
  SSLCertificateKeyFile "/opt/e2ebridge/5.0/data/proxies/conf/services.e2ebridge.com_key.pem"
  SSLCertificateChainFile "/opt/e2ebridge/5.0/data/proxies/conf/DigiCertCA.crt"
  RedirectMatch ^/saprestifier$ /saprestifier/
  ProxyPass /saprestifier/ http://sap.e2e.ch/
  ProxyPassReverse /saprestifier/ http://sap.e2e.ch/
  RedirectMatch ^/saprestifier-beta$ /saprestifier-beta/
  ProxyPass /saprestifier-beta/ http://sap.e2e.ch:3002/
  ProxyPassReverse /saprestifier-beta/ http://sap.e2e.ch:3002/
  <Directory />
    DirectoryIndex index.html
  </Directory>
  <Location /saprestifier>
    AddOutputFilterByType SUBSTITUTE text/html
    Substitute "s|<base href=\"/\">|<base href=\"/saprestifier/\">|i"
    AuthType Basic
    AuthName "E2E RESTifier for SAP"
    AuthBasicProvider file
    AuthUserFile "/opt/e2ebridge/5.0/data/proxies/sap.auth"
    Require valid-user
  </Location>
  <Location /saprestifier-beta>
    AddOutputFilterByType SUBSTITUTE application/json
    Substitute "s|http://sap.e2e.ch:3002/sap|https://services.e2ebridge.com/saprestifier-beta/sap|i"
    AuthType Basic
    AuthName "E2E RESTifier for SAP"
    AuthBasicProvider file
    AuthUserFile "/opt/e2ebridge/5.0/data/proxies/sap.auth"
    Require valid-user
  </Location>
</VirtualHost>
  • No labels