1. 本文以 linux系统(centos 7),tomcat8.0容器作为生产环境(tomcat8.0 以前的版本感觉太老了。。。)。
直接上配置文件(tomcat根路径下conf目录中的server.xml文件)
知道大家比较懒,我复制了一份给大家,粘贴可用
<Service name="Catalina">
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<Connector port="8010" protocol="AJP/1.3" redirectPort="8443" />
<Engine name="Catalina" defaultHost=".com">
<Realm className="org.apache.catalina.realm.LockOutRealm">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>
<Host name=".com" appBase="webapps"
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 docBase="/home/cm/tomcat8/webapps/cm-web" path="" reloadable="true "></Context>
</Host>
</Engine>
</Service>