Tomcat 一个端口只用于一个WAR
我的 tomcat 6 服务器上运行着两个 WAR 文件。
如何设置每个 WAR 仅监听一个端口? 例如:
端口443 =>只能访问a.war
端口8000 =>只能访问b.war
I have two WAR file running in my tomcat 6 server.
How can i set each WAR listen to only one port?
For example:
port 443 => only can access a.war
port 8000 => only can access b.war
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我设法使用以下设置配置上述场景:我在 webapp 文件夹下创建了两个名为 443 和 8000 的文件夹,并配置了两个服务-元素指向两个不同的文件夹并侦听两个不同的端口。
服务器.xml
I managed to configure the above scenario using these settings: I created two folders named 443 and 8000 under the webapp folder, and configured two Service-elements pointing to two different folders and listening on two different ports.
server.xml