Redirect 代理tomcat URL将主机请求映射到路径
如果可能,我如何将主机名请求重定向到某个已部署应用程序的特定子目录 例如,我希望转发Redirect 代理tomcat URL将主机请求映射到路径,redirect,tomcat6,host,subdirectory,Redirect,Tomcat6,Host,Subdirectory,如果可能,我如何将主机名请求重定向到某个已部署应用程序的特定子目录 例如,我希望转发 http://host.com 到 但是,可以重定向到tomcat上的特定应用程序,例如 <Host name="host.com" appBase="webapps"> <Context path="/" docBase="webapps/app" debug="6"/> </Host> 但我从未设法将其重定向到应用程序的子路径。为
http://host.com
到
但是,可以重定向到tomcat上的特定应用程序,例如
<Host name="host.com" appBase="webapps">
<Context path="/" docBase="webapps/app" debug="6"/>
</Host>
但我从未设法将其重定向到应用程序的子路径。为了实现这一点,我希望使用tomcat专用的方法,而不是使用apache2的外部mod_代理 通过将路径更改为
”
(即使其成为主机的默认web应用程序),这对我来说很有效
它正确地提供静态文件,但是我的JSTL现在失败了
无论如何,你能试试吗?这似乎不可能。最终的解决方案是使用Apache2的mod_代理来代理请求 嗯,对我来说,两种方法似乎都有相同的影响。也就是说,它允许我将“host.com”与“host.com/app”关联,但不能与“host.com/app/path”关联。
<Host name="host.com" appBase="webapps">
<Context path="/" docBase="webapps/app" debug="6"/>
</Host>
<Host name="host.com" appBase="webapps">
<Context path="" docBase="webapps/app" debug="6"/>
</Host>