1,阿里云上 申请域名
2,域名与ip绑定
3,tomcat配置文件配置
<Engine name="Catalina" defaultHost="www.strgo.com">
<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
via a brute-force attack -->
<Realm className="org.apache.catalina.realm.LockOutRealm">
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>
<Host name="www.strgo.com" appBase="webapps"
unpackWARs="true" autoDeploy="true">
上段 的 defaultHost 和 host 中的name 改成域名全称
注意:80 端口必须备案 ,需在备案后才能进行访问,其他非80端口可以直接访问,没有备案信息
采用 www.strgo.com:xxxx/kdepg/...的形式