在$tomcat_home/conf/server.xml 的Engine节点下增加Host元素即可。
<Host appBase="" autodeploy="false" name="mydomain.xx.com" unpackwars="false">
<Alias>mydomain.xx.com</Alias>
<Context path="" docBase="D:/myproject/cbpop/cbpop-web/target/cbpop-web" debug="0" reloadable="true" />
</Host>
<Host appBase="" autodeploy="false" name="mydomain2.xx.com" unpackwars="false">
<Alias>mydomain2.xx.com</Alias>
<Context path="" docBase="D:/myproject/cbpop/cbpop-web/target/cbpop-web2" debug="0" reloadable="true" />
</Host>