在server.xml 修改如下

<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs/log"
prefix="localhost_access_log" suffix=".log"
pattern="&quot;%{X-FORWARDED-FOR}i&quot;client&quot;:&quot;%h&quot;, &quot;client user&quot;:&quot;%l&quot;, &quot;authenticated&quot;:&quot;%u&quot;, &quot;access time&quot;:&quot;%t&quot;, &quot;method&quot;:&quot;%r&quot;, &quot;status&quot;:&quot;%s&quot;, &quot;send bytes&quot;:&quot;%b&quot;, &quot;Query?string&quot;:&quot;%q&quot;, &quot;partner&quot;:&quot;%{Referer}i&quot;, &quot;Agent version&quot;:&quot;%{User-Agent}i&quot;" />

在catalina.sh 添加 JAVA_OPTS="-server -Xms4096m -Xmx4096m -XX:PermSize=256M -XX:MaxNewSize=512m -XX:MaxPermSize=512m -Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom" 最后一句是优化tomcat 启动速度