Locate Apache-tomcat-6.0.14\conf\server.xml, and then add this snippet to the following services:
XML code
<!--the new project configuration here--
<service name= "Pro" >
<connector port= "8090" protocol= "http/1.1" connectiontimeout= "20000" redirectport= "8444"/>
<connector port= "9999" protocol= "ajp/1.3" redirectport= "8444"/>
<engine name= "Pro" defaulthost= "localhost" >
<realm classname= "Org.apache.catalina.realm.UserDatabaseRealm" resourcename= "Userdatabase"/>
<context docbase= "D:/pro/webroot" path= ""/>
</Host>
</Engine>
</Service>
<!--the new project configuration here--
<service name= "Pro" >
<connector port= "8090" protocol= "http/1.1" connectiontimeout= "20000" redirectport= "8444"/>
<connector port= "9999" protocol= "ajp/1.3" redirectport= "8444"/>
<engine name= "Pro" defaulthost= "localhost" >
<realm classname= "Org.apache.catalina.realm.UserDatabaseRealm" resourcename= "Userdatabase"/>
<context docbase= "D:/pro/webroot" path= ""/>
</Host>
</Engine>
</Service>
The above d:/pro/webroot is my project WebRoot path, everyone can modify themselves, another pro is also customized.
The detailed text reads as follows:
XML code
<?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.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>
<!--above is the default configuration--
<!--This method is configured by default--
<service name= "Catalina" >
<connector port= "8008" protocol= "http/1.1"
connectiontimeout= "20000"
redirectport= "8443"/>
<connector port= "8009" protocol= "ajp/1.3" redirectport= "8443"/>
<engine name= "Catalina" defaulthost= "localhost" >
<realm classname= "Org.apache.catalina.realm.UserDatabaseRealm"
Resourcename= "Userdatabase"/>
Unpackwars= "true" autodeploy= "true"
Xmlvalidation= "false" Xmlnamespaceaware= "false" >
</Host>
</Engine>
</Service>
<!--the new project configuration here--
<service name= "Pro" >
<connector port= "8090" protocol= "http/1.1" connectiontimeout= "20000" redirectport= "8444"/>
<connector port= "9999" protocol= "ajp/1.3" redirectport= "8444"/>
<engine name= "Pro" defaulthost= "localhost" >
<realm classname= "Org.apache.catalina.realm.UserDatabaseRealm" resourcename= "Userdatabase"/>
<context docbase= "D:/pro/webroot" path= ""/>
</Host>
</Engine>
</Service>
</Server>
<?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.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>
<!--above is the default configuration--
<!--This method is configured by default--
<service name= "Catalina" >
<connector port= "8008" protocol= "http/1.1"
connectiontimeout= "20000"
redirectport= "8443"/>
<connector port= "8009" protocol= "ajp/1.3" redirectport= "8443"/>
<engine name= "Catalina" defaulthost= "localhost" >
<realm classname= "Org.apache.catalina.realm.UserDatabaseRealm"
Resourcename= "Userdatabase"/>
Unpackwars= "true" autodeploy= "true"
Xmlvalidation= "false" Xmlnamespaceaware= "false" >
</Host>
</Engine>
</Service>
<!--the new project configuration here--
<service name= "Pro" >
<connector port= "8090" protocol= "http/1.1" connectiontimeout= "20000" redirectport= "8444"/>
<connector port= "9999" protocol= "ajp/1.3" redirectport= "8444"/>
<engine name= "Pro" defaulthost= "localhost" >
<realm classname= "Org.apache.catalina.realm.UserDatabaseRealm" resourcename= "Userdatabase"/>
<context docbase= "D:/pro/webroot" path= ""/>
</Host>
</Engine>
</Service>
</Server>
Linux server Apache one IP, one port, method for building multiple websites.