A tomcat process can deploy multiple domain names OH. 1. Buy domain name, set resolution recommend to Aliyun purchase.
Figure 1-1 Domain name resolution
The effect of this parsing is, access to ' yichudu.com ', the browser address bar will automatically become ' www.yichudu.com '. Baidu, QQ is so dry. 2. Configure a virtual host a domain name corresponds to a virtual host. In $tomcat_home/conf/server.xml, add <Host> tags under the <Engine> label.
Restart Tomcat.
3. Configure the virtual directoryConfigure a virtual directory with an empty path name, see Chapter 2. The virtual directory can be under appbase/or not under appbase/.
4. Configure the Web project's default page
Configure the default page, in the Address bar display ' www.yichudu.com ' situation can show specific pages, the simplicity of the URL appears to force the grid high.
<web-app>
<!--...-->
<welcome-file-list>
<!--must can ' t start with '/'-->
<welcome-file>springmvc/pages/index</welcome-file>
</welcome-file-list>
</web-app >
Figure 4-1 shows the effect
5. Configure Manager for Host
Move $TOMCAT _home/manager folder under each host and set it up in Conf/tomcat-users.xml.
You can manage applications by typing http://domainName/manager/html in the address bar.