[英]Deploy Java web application war file in domain
I developed a java web application and generated 2 different enviroment war files names as test.war and prod.war file. 我开发了一个Java Web应用程序,并生成了两个不同的环境war文件名,分别为test.war和prod.war文件。
I want to publish the war file in the domain. 我想在域中发布战争文件。 so i bought the domain.
所以我买了域名。 for ex:- www.example.com
例如:-www.example.com
and I want to publish my war files in domain as "www.test.example.com" and www.prod.example.com ". Is this possible to do this ? 并且我想将我的战争文件在域中发布为“ www.test.example.com”和“ www.prod.example.com”。是否可以这样做?
Yes it is possible. 对的,这是可能的。
You has bought the last part domain.com
, then you need to configure DNS to point www.test.example.com
and www.prod.example.com
to an IP of a machine owned by you (you can have one machine for each domain). 您已经购买了
domain.com
的最后一部分,然后需要配置DNS,以将www.test.example.com
和www.prod.example.com
指向您拥有的计算机的IP(每个计算机可以有一台计算机)域)。
If you have tomcat then you can deploy two virtual hosts, each one responding to a domain, with its own war deployment 如果您有tomcat,则可以部署两个虚拟主机,每个虚拟主机响应一个域,并具有自己的war部署
<Engine name="Catalina" defaultHost="www.test.example.com">
<Host name="www.test.example.com" appBase="test"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
</Host>
<Host name="www.prod.example.com" appBase="prod"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Alias>example.com</Alias>
</Host>
</Engine>
域是具有公共IP的公共地址,首先购买一个平台,该平台应提供jvm和应用程序容器,然后您可以为子域配置部署描述符
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.