<Host name="www.b1.com" appBase="D:\jsp_Tomcat\web\www.b1.com" unpackWARs="true" autoDeploy="true"> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="%h %l %u %t "%r" %s %b" /> <Context path="/news" docBase="D:\jsp_Tomcat\web\www.b1.com\news"> </Host> <Host name="www.b2.com" appBase="D:\jsp_Tomcat\web\www.b2.com" unpackWARs="true" autoDeploy="true"> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="%h %l %u %t "%r" %s %b" /> </Host> <Host name="www.b3.com" appBase="D:\jsp_Tomcat\web\www.b3.com" unpackWARs="true" autoDeploy="true"> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="%h %l %u %t "%r" %s %b" /> </Host> <Host name="www.b4.com" appBase="D:\jsp_Tomcat\web\www.b4.com" unpackWARs="true" autoDeploy="true"> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="%h %l %u %t "%r" %s %b" /> </Host>
0则评论给“Tomcat虚拟主机设置”