可以在标准Java应用服务器中将子域映射到Web应用吗? [英] Possible to map subdomains to webapps in a standard Java app server?

查看:98
本文介绍了可以在标准Java应用服务器中将子域映射到Web应用吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果在像Tomcat这样的J2EE应用服务器中有两个Web应用程序foo和bar,则区分它们的通常方法如下:

If you have two webapps, foo and bar, in a J2EE app server like Tomcat, the normal way to distinguish them is like this:

domain.com/foo
domain.com/bar

我想改为这样做:

foo.domain.com
bar.domain.com

这可能吗?

推荐答案

这不是可以标准"方式完成的事情-每个Java应用程序服务器都有不同的配置方式.您将需要查看要部署到任何服务器的文档.

It's not something that can be done in a "standard" way - each Java app server has different ways of configuring itself. You will need to look at the documentation for which-ever server you want to deploy to.

对于Jetty,该文档位于此处: http://wiki.eclipse.org/Jetty/Howto/Configure_Virtual_Hosts

For Jetty, that documentation is here: http://wiki.eclipse.org/Jetty/Howto/Configure_Virtual_Hosts

这篇关于可以在标准Java应用服务器中将子域映射到Web应用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆