Archiv für den Monat: März 2015

get WebLogic working with Apache as reverse proxy (mod_proxy)

There is Oracle Reports running on a WebLogic Server. I want it to run on https but for some reason I don’t know it wasn’t working for the Internet Explorer 11 (and maybe other versions too). IE11 just timed out and never displayed any html nor could be establish a connection. It worked with Chrome and Firefox.
As a fast workaround I thought, lets install a Apache and make the ssl stuff there and proxy it to the WebLogic http listening address. Both WebLogic and Apache are on the same machine, so no problem with using the http port.

With the usual Apache config for mod_proxy:


...
ProxyPass /reports http://somedomain.tld:7002/reports
ProxyPassReverse /reports http://somedomain.tld:7002/reports
...

Those lines weren’t enough because I could still see links to http://somedomain.tld:7002/reports* embedded within the html code.
With enabling additional options and rewriting html I thought it could be managed:


SetOutputFilter proxy-html
ProxyHTMLEnable On
ProxyHTMLExtended On
ProxyHTMLURLMap http://somedomain.tld:7002/reports https://somedomain.tld/reports

Most of the links worked now but there were still pages not displaying correctly. Those pages just had


<html>
<head>
<base href="https://somedomain.tld/reports/rwservlet/getfile/HW-NW8428FX-mIL4832KDA-==/0jsdfUjid.htm">
</head></html>

in it.

Without the Apache proxy it was something like:


<html>
<head>
<base href="http://somedomain.tld:7002/reports/rwservlet/getfile/HW-NW8428FX-mIL4832KDA-==/0jsdfUjid.htm">
</head></html>

<html>
...
whole page content
...
</html>

After googling I finally found a solution… Simple tell WebLogic that there is a proxy in front of it 🙂
In short:

  • enable „WebLogic Plug-In Enabled“ in Domain Structure > Environment > Servers > managed01 > Configuration General > Advanced
  • write in your hostname in „Frontend Host:“ and set your https port in „Frontend HTTPS Port:“ Domain Structure > Environment > Servers > managed01 > Protocols > HTTP
  • save changes and restart WebLogic
  • set an additional header within your Apache config: RequestHeader set WL-Proxy-SSL true
  • restart Apache
  • it should work now 🙂