1

I have a Java EAR application deployed to a couple of liberty 16.x application servers, and have one IBM HTTP Proxy server (Apache) running in front of it acting as the load balancer and HTTPS proxy. I want to have our intranet users simply enter in an easy to remember URL like https://product-aa and then be redirected to https://server-aa:8443/EarApplication, without needing to have them manually add the context root in the URL.

I'm trying to figure out the best way to achieve this.

Sundance
  • 45
  • 5
  • Are you using the WAS Plug-in or mod_proxy? Do you already use virtual hosts in IHS and if so, what is your apachectl -S output? – covener Dec 05 '17 at 20:43
  • I'm using the WAS Plug-in (plugin-cfg.xml), and I'm not sure about the virtual host configuration in the httpd.conf as we're pretty much using the one that came with the IBM installation of the IHS. – Sundance Dec 06 '17 at 00:01

1 Answers1

2

First, register product-aa in DNS as a CNAME for server-aa

Then append to httpd.conf:

NameVirtualHost *:80
<virtualhost *:80>
  ServerName server-aa
</virtualhost>
<virtualhost *:80>
  ServerName product-aa
  RedirectMatch ^/$ /EarApplication
  # ... or http://server-aa/EarApplication
</virtualhost>
covener
  • 17,402
  • 2
  • 31
  • 45