Sundance
Sundance

Reputation: 45

How to append context root in IBM HTTP Proxy for Liberty Server

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.

Upvotes: 1

Views: 418

Answers (1)

covener
covener

Reputation: 17886

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>

Upvotes: 2

Related Questions