By default, the Tomcat application directory is the WebApps directory under the Tomcat base directory, the http://ip/project name is required to access the project after accessing the WebApps directory, and if you want to configure Server.xml directly, modify
Create multiple virtual hosts from a domain name
Dation= "false" >
<context docbase= "/data/zdz1/" path= "" reloadable= "false"/>
</Host>
Ation= "false" >
<context docbase= "/data/zdz2/" path= "" reloadable= "false"/>
</Host>
By default, Tomcat defines the access log to Logs/localhost_access_log,
<valve classname= "Org.apache.catalina.valves.AccessLogValve" directory= "Logs"
Prefix= "Localhost_access_log." suffix= ". txt"
pattern= "%h%l%u%t "%r" %s%b "/>
You can define access logs in each virtual host, and you can format the log as needed
%{x-forwarded-for}i represents obtaining the client's true IP address, which is used when the Tomcat front-end has a reverse proxy.
N= "false" >
<context docbase= "/data/zdz3/" path= "" reloadable= "false"/>
<valve classname= "Org.apache.catalina.valves.AccessLogValve" directory= "Logs"
Prefix= "Tomcat3.zdz.com_access_log." suffix= ". txt"
pattern= "%{x-forwarded-for}i%a%u%t%r%s%b%{user-agent}i%{referer}i" resolvehosts= "false"/>
</Host>