Tomcat sets a second-level domain name. Tomcat configures an ip address to bind multiple domain names. The method for configuring an ip address to multiple domain names under tomcat is as follows. The configuration below will be successful. After testing, set the server under tomcatconf. xml file: hostnamelocalhostdebuw.appbased: \ Tomcat5.0 \ webw.unpackwars
ToMcAt
TomCatConfigure an ip address to bind multiple domain names
The following describes how to configure an ip address for multiple domain names in tomcat. The configuration can be successful as follows. After testing, set the server. xml file in tomcat/conf:
UnpackWARs =" TrUe "autoDeploy =" true"
XmlVal IdAtion = "fa LsE "xmlNamespaceAware =" false ">
Localhost.com
Directory = "logs" prefix = "localhost_log ." SuFfix = ". txt"
TimeStamp = "true"/>
ExT path = "" docBase = "D :\\ Tomcat 5.0 \ webapps \ gg" reloadable = "true" caseSensitive = "false" debug = "0">
UnpackWARs = "true" autoDeploy = "true"
XmlValidation = "false" xmlNamespaceAware = "false">
One.localhost.com
Directory = "logs" prefix = "localhost_log." suffix = ". txt"
Timestamp = "true"/>
UnpackWARs = "true" autoDeploy = "true"
XmlValidation = "false" xmlNamespaceAware = "false">
Two.localhost.com
Directory = "logs" prefix = "localhost_log." suffix = ". txt"
Timestamp = "true"/>
Because there is no domain name resolution server, it is configured on hosts to simulate dns resolution.
10.1.1.241 localhost points to the gg folder
10.1.1.241 localhost.com points to the gg folder
10.1.1.241 one. localhost points to the folder.
10.1.1.241 one.localhost.com points to a folder
10.1.1.241 two. localhost points to the B folder
10.1.1.241 two.localhost.com points to the B folder
After many attempts, the configuration under tomcat is successful.