简体   繁体   English

如何在IBM HTTP Proxy for Liberty Server中附加上下文根

[英]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. 我已经将Java EAR应用程序部署到了两个自由16.x应用程序服务器,并且在其前面运行着一个IBM HTTP代理服务器(Apache),以充当负载平衡器和HTTPS代理。 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. 我希望我们的Intranet用户只需输入一个易于记忆的URL,例如https:// product-aa ,然后重定向到https:// server-aa:8443 / EarApplication ,而无需让他们手动添加上下文根在网址中。

I'm trying to figure out the best way to achieve this. 我正在尝试找出实现此目标的最佳方法。

First, register product-aa in DNS as a CNAME for server-aa 首先,在DNS中将product-aa注册为服务器aaa的CNAME

Then append to httpd.conf: 然后附加到httpd.conf:

NameVirtualHost *:80
<virtualhost *:80>
  ServerName server-aa
</virtualhost>
<virtualhost *:80>
  ServerName product-aa
  RedirectMatch ^/$ /EarApplication
  # ... or http://server-aa/EarApplication
</virtualhost>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM