tomcat 6 - 如何默认运行2个应用程序?
我有2个tomcat应用程序,我想在同一台服务器上运行,是否有可能让tomcat足够聪明,说如果进入域1,默认进入应用程序1,进入域2,默认进入应用程序2?
现在,其中一个应用程序已重命名为“ROOT”,因此无论域如何,它都会获得所有默认流量。
如果不是,我想我需要向框中添加另一个 ip 并运行服务器的 22 个实例?如果我必须走这条路线,如何强制它侦听特定 IP 而不是默认接口?
谢谢 乔尔
I have 2 tomcat apps I want to run on the same server, is it possible to have tomcat be smart enough to say if comes in on domain 1 go to app 1 as default and domain 2, go to app 2 as default?
Right now one of the apps is renamed to be called ROOT so it gets all the default traffic regardless of domain.
If not I guess I need to add another ip to the box and run 22 instances of the server? If I have to go this route, how to I force it to listen on a specific ip instead of the default interface?
thanks
Joel
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 tomcat 虚拟主机 来实现此目的。
You can use tomcat virtual hosts for that.
你最好使用modjk http://tomcat.apache.org/tomcat-3.3 -doc/mod_jk-howto.html 或
您可以使用 mod_proxy http://httpd.apache.org/docs/2.2/mod /mod_proxy.html 来执行此操作。
you better use modjk http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html or
you can use mod_proxy http://httpd.apache.org/docs/2.2/mod/mod_proxy.html to do this.