After the Tomcat server is built, it is recommended that you bind the domain name to the server. The binding method is as follows: Domain binding requires editing the Tomcat configuration file to complete. The Tomcat configuration file is the installation directory for Tomcat Tomcat_home/conf/server.xml,tomcat_home.
The original configuration file is as follows:
Modify the above content to:
The modified meaning is: 1) www.aaa.com is the default domain name of the website, access to www.aaa.com will visit the Web page of the Tomcat website root directory, 2) access to www.abc.com, The default jumps to the ABC directory under the Tomcat root directory, 3) The IP address of the access server 192.168.0.153, which will default to the Def directory under the Tomcat root directory;
Restart the Tomcat server after the modification to take effect.
How the Tomcat service binds domain names