【发布时间】:2011-02-06 04:00:10
【问题描述】:
我在为两个在 tomcat 中具有两个不同上下文路径的应用程序配置 apache tomcat ProxyPass 指令时遇到问题。 tomcat 在 apache 后面运行,我使用 apache 代理对 tomcat 的请求的路径。在 apache 中,我想通过主机名而不是上下文路径访问这两个应用程序。
场景:
tomcat
https://domain:8443/app1
https://domain:8443/app2
在 tomcat 中,应用程序具有上下文路径 app1 和 app2
在 apache 中我想启用这两个应用程序如下:
https://app1.host/
https://app2.host/
在 apache 中,我为每个域创建了一个配置:
ProxyPass / https://localhost:8443/app1
ProxyPassReverse / https://localhost:/8443/app1
奇怪的是app1只能通过apache使用上下文路径:
https://app1.host/app1
是否可以使用 apache ProxyPass 模块实现这样的设置?
感谢您的帮助。
【问题讨论】: