On the internet for a long time also did not find the relevant information, are said too vague.
I configure tomcat under a multiple domain name method detailed below, according to the following configuration must be successful, after testing.
Unpackwars= "true" autodeploy= "true"
Xmlvalidation= "false" Xmlnamespaceaware= "false" >
<Alias>localhost.com</Alias>
<logger classname= "Org.apache.catalina.logger.FileLogger"
directory= "Logs" prefix= "Localhost_log." suffix= ". txt"
Timestamp= "true"/>
<context path= "" docbase= "D://tomcat 5.0//webapps//gg" reloadable= "true" Casesensitive= "false" debug= "0" ></ Context>
</Host>
unpackwars= "true" autodeploy= "true"
xmlvalidation= "false" Xmlnamespaceaware= "false"
<alias>one.localhost.com</alias >&NBSP
<logger classname= "Org.apache.catalina.logger.FileLogger"
directory= "Logs" prefix= "Localhost_log." suffix= ". txt"
timestamp= "true"/>
<context path= "docbase=" D://tomcat 5.0//webapps//kk//a " reloadable=" true "Casesensitive=" false "debug=" 0 "></CONTEXT>
</Host>
Unpackwars= "true" autodeploy= "true"
Xmlvalidation= "false" Xmlnamespaceaware= "false" >
<Alias>two.localhost.com</Alias>
<logger classname= "Org.apache.catalina.logger.FileLogger"
directory= "Logs" prefix= "Localhost_log." suffix= ". txt"
Timestamp= "true"/>
<context path= "" docbase= "D://tomcat 5.0//webapps//kk//b" reloadable= "true" Casesensitive= "false" debug= "0" > </Context>
</Host>
Because no domain name resolution server, so in the hosts match, to simulate DNS resolution.
10.1.1.241 localhost point to GG folder
10.1.1.241 localhost.com point to GG folder
10.1.1.241 One.localhost point to Folder a
10.1.1.241 one.localhost.com point to Folder a
10.1.1.241 Two.localhost point to Folder B
10.1.1.241 two.localhost.com point to Folder B
After many attempts, finally in Tomcat configuration succeeded.
When modifying the default application: Change the Defaulthost and set the context path to empty.
When configuring multiple applications:
such as: http://localhost:8080/
Http://localhost:8080/first
Http://localhost:8080/second
The corresponding configuration is as follows:
Unpackwars= "true" autodeploy= "true"
xmlvalidation= "false" Xmlnamespaceaware= "false"
<Alias>localhost.com</Alias> &NBSP
<logger classname= "Org.apache.catalina.logger.FileLogger"
directory= " Logs " prefix=" Localhost_log. "suffix=". txt "
timestamp= "true"/>
<context path= "" DocBase = "D://tomcat 5.0//webapps//root" reloadable= "true" Casesensitive= "false" debug= "0" ></Context>
<context path= "/first" docbase= "D://tomcat 5.0//webapps//first" reloadable= "true" Casesensitive= "false" debug= "0" ></CONTEXT>
<context path= "/second" docbase= "D://tomcat 5.0//webapps//second" reloadable= "true" casesensitive= " False "debug=" 0 ></context>