Main configuration server.xml files in tomcat/conf directory
1. Change the default 8080 port to 80 port first
<connector connectiontimeout= "20000" port= "protocol=" http/1.1 "redirectport=" 8443
Note: Set the port= "80" of the connector node
2. Configure project Directory Access
<context path= "docbase=". "/>
<context path= "/i18n" docbase= "."/>
</Host>
Note: Set the host node's name= "localhost", name is to set access mode, with localhost access, this machine directly use localhost access on the line, other IP address directly through the local IP address can be accessed. Appbase= "webapps/i18n", WebApps the application directory, where the relative directory of webapps/i18n is set. The project absolute path is the project directory for the I18N deployment under the Tomcat installation directory]c:/tomcat/webapps/i18n, which is webapps under Tomcat.
The difference between AppBase and docbase in Tomcat
The AppBase directory says: 1. Subdirectories below this directory will automatically be deployed as applications. 2. The. War file under this directory will be automatically decompressed and deployed as an application.
The Docbase directory represents:
A directory that points to an application.
If you want to specify the path, then you should write it in Docbase if you feel trouble, copy it directly under AppBase.
If you repeat the two directory settings and point to the same directory, it looks like it will work, but each subdirectory below your application is actually deployed as a standalone application.