I have two more projects to deploy on one machine, two projects for two different services, one to start listening on 8001 and another to listen on 8002 ports, which is a multi-port-based virtual machine host configuration, only need to change the conf/in the Tomcat directory Server.xml configuration file with the following contents:
<?xml version= ' 1.0 ' encoding= ' utf-8 '? ><server port= "8005" shutdown= "Shutdown" > <listener classname= "Org.apache.catalina.core.AprLifecycleListener" sslengine= "on" /> <listener classname= "Org.apache.catalina.core.JasperListener" /> <listener classname= "Org.apache.catalina.core.JreMemoryLeakPreventionListener" /> <listener classname= "Org.apache.catalina.mbeans.ServerLifecycleListener" /> <listener classname= "Org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> <globalnamingresources> <resource name= "UserDatabase" auth= " Container " type=" Org.apache.catalina.UserDatabase " description= "User daTabase that can be updated and saved " factory= "Org.apache.catalina.users.MemoryUserDatabaseFactory" pathname= "Conf/tomcat-users.xml" /> </GlobalNamingResources><!-- Application 1 Personal Center WAP version--> < Service name= "Catalina1" > <connector port= "8001" protocol= "HTTP/ 1.1 " connectiontimeout=" 20000 " redirectport=" 8443 " /> <connector port= "8009" protocol= "ajp/1.3" redirectport= "8443" /> < Engine name= "Catalina1" defaulthost= "localhost" > <realm classname= "Org.apache.catalina.realm.UserDatabaseRealm" rEsourcename= "userdatabase"/> Then start Tomcat on the line. (The tomcat version of this test is 1.6.x JDK version 1.6.x)
Tomcat multi-port-based virtual host configuration