配置tomcat日志及虚拟目录
在tomcat的server.xml中添加如下代码:
<Valveclassname="org.apache.catalina.valves.AccessLogValve"
directory="logs"prefix="localhost_access_log."suffix=".txt"
pattern="%h%l%u%t"%r"%s%b"%{Referer}i""%{User-Agent}i""%{Cookie}i""%{Host}i""resolveHosts="false"/>
directory="logs"是将日志生成到tomcat下面的logs文件夹中
prefix="localhost_access_log."生成日志的命名
配置虚拟目录
<Contextpath="/webstat"
docBase="x:/tomcat5.5/logs"
crossContext="true"
debug="0"
reloadable="true"
trusted="false">
<Valveclassname="org.apache.catalina.valves.RemoteAddrValve"
allow="XXX.XXX.XXX.XXX"/>
</Context>
allow="XXX.XXX.XXX.XXX"可以设置访问的IP
相关推荐
85530194 2014-07-28
FanErZong 2020-07-18
86284851 2020-06-16
85427617 2020-06-13
88291846 2020-06-07
86284851 2020-02-28
81510598 2020-01-08
88291846 2020-01-04
86284851 2019-12-28
detianlangzi 2014-06-17
85427617 2019-12-24
87497118 2019-11-28
82981634 2014-03-25
85427617 2015-08-19
81510598 2019-11-11
86284851 2019-11-08