On the Internet looking for a long time did not find the relevant information, that's too vague.
I tomcat configuration under a multi-ip domain of the following methods in detail, according to the following configuration will succeed, after the test.
<Host name = "localhost" debug = "0" appBase = "D: \ \ Tomcat 5.0 \ \ webapps"
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>
<Host name = "one.localhost" debug = "0" appBase = "D: \ \ Tomcat 5.0 \ \ webapps"
unpackWARs = "true" autoDeploy = "true"
xmlValidation = "false" xmlNamespaceAware = "false">
<Alias> One.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\\a" reloadable="true" caseSensitive="false" debug="0"> </ Context>
</ Host>
<Host name = "two.localhost" debug = "0" appBase = "D: \ \ Tomcat 5.0 \ \ webapps"
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>
In the absence of DNS servers, so the hosts on the distribution, to simulate the dns resolve.
10.1.1.241 localhost point to the folder gg
10.1.1.241 localhost.com point to the folder gg
10.1.1.241 one.localhost point to a folder
10.1.1.241 one.localhost.com point to a folder
10.1.1.241 two.localhost point to the folder b
10.1.1.241 two.localhost.com point to the folder b
After many attempts, finally under tomcat configuration successful. |