0
点赞
收藏
分享

微信扫一扫

07.tomcat主配置文件

主配置文件server.xml

#shutdown 端口 连接到这个端口 并 输入后面的 暗号 把tomcat关闭
22 <Server port=8005 shutdown=SHUTDOWN>

#tomcat管理端
37 <GlobalNamingResources>
38 <!-- Editable user database that can also be used by
39 UserDatabaseRealm to authenticate users
40 -->

41 <Resource name=UserDatabase auth=Container
42 type=org.apache.catalina.UserDatabase
43 description=User database that can be updated and saved
44 factory=org.apache.catalina.users.MemoryUserDatabaseFactory
45 pathname=conf/tomcat-users.xml />

46 </GlobalNamingResources>

#tomcat线程,最忙时候线程最大150个,闲时4个
57 <Executor name=tomcatThreadPool namePrefix=catalina-exec-
58 maxThreads=150 minSpareThreads=4/>


#tomcat的web端口
69 <Connector port=8080 protocol=HTTP/1.1
70 connectionTimeout=20000
71 redirectPort=8443 />


#8009 ajp 工作方式 与apache配合
91 <Connector port=8009 protocol=AJP/1.3 redirectPort=8443 />

#host 虚拟主机部分(如同nginx的server标签)
#Host name == server_name (如同nginx的server_name)
#appBase == root (如同nginx的root站点目录)
123 <Host name=localhost appBase=webapps
124 unpackWARs=true autoDeploy=true>
#自动解压;自动部署
125
126 <!-- SingleSignOn valve, share authentication between web applications
127 Documentation at: /docs/config/valve.html -->

128 <!--
129 <Valve className=org.apache.catalina.authenticator.SingleSignOn />
130 -->

131
132 <!-- Access log processes all example.
133 Documentation at: /docs/config/valve.html
134 Note: The pattern used is equivalent to using pattern=common -->

135 <Valve className=org.apache.catalina.valves.AccessLogValve directory=logs
136 prefix=localhost_access_log suffix=.txt
137 pattern=%h %l %u %t %r %s %b />

138
139 </Host>

#tomcat 访问日志的格式
135 <Valve className=org.apache.catalina.valves.AccessLogValve directory=logs
136 prefix=localhost_access_log suffix=.txt
137 pattern=%h %l %u %t %r %s %b />

举报

相关推荐

0 条评论