質問編集履歴
2
server.xmlの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -439,3 +439,5 @@
|
|
439
439
|
</Service>
|
440
440
|
|
441
441
|
</Server>
|
442
|
+
|
443
|
+
```
|
1
server.xmlの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -97,3 +97,345 @@
|
|
97
97
|
|
98
98
|
|
99
99
|
以上からec2上のtomcatのconf配下にあるserver.xmlとcontext.xmlの記述が怪しいのではと考えているのですが、自力ではこれ以上わからなかったため質問いたしました。
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
```server.xml
|
104
|
+
|
105
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
106
|
+
|
107
|
+
<!--
|
108
|
+
|
109
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
110
|
+
|
111
|
+
contributor license agreements. See the NOTICE file distributed with
|
112
|
+
|
113
|
+
this work for additional information regarding copyright ownership.
|
114
|
+
|
115
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
116
|
+
|
117
|
+
(the "License"); you may not use this file except in compliance with
|
118
|
+
|
119
|
+
the License. You may obtain a copy of the License at
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
Unless required by applicable law or agreed to in writing, software
|
128
|
+
|
129
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
130
|
+
|
131
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
132
|
+
|
133
|
+
See the License for the specific language governing permissions and
|
134
|
+
|
135
|
+
limitations under the License.
|
136
|
+
|
137
|
+
-->
|
138
|
+
|
139
|
+
<!-- Note: A "Server" is not itself a "Container", so you may not
|
140
|
+
|
141
|
+
define subcomponents such as "Valves" at this level.
|
142
|
+
|
143
|
+
Documentation at /docs/config/server.html
|
144
|
+
|
145
|
+
-->
|
146
|
+
|
147
|
+
<Server port="8005" shutdown="SHUTDOWN">
|
148
|
+
|
149
|
+
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
|
150
|
+
|
151
|
+
<!-- Security listener. Documentation at /docs/config/listeners.html
|
152
|
+
|
153
|
+
<Listener className="org.apache.catalina.security.SecurityListener" />
|
154
|
+
|
155
|
+
-->
|
156
|
+
|
157
|
+
<!--APR library loader. Documentation at /docs/apr.html -->
|
158
|
+
|
159
|
+
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
|
160
|
+
|
161
|
+
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
|
162
|
+
|
163
|
+
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
|
164
|
+
|
165
|
+
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
|
166
|
+
|
167
|
+
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<!-- Global JNDI resources
|
172
|
+
|
173
|
+
Documentation at /docs/jndi-resources-howto.html
|
174
|
+
|
175
|
+
-->
|
176
|
+
|
177
|
+
<GlobalNamingResources>
|
178
|
+
|
179
|
+
<!-- Editable user database that can also be used by
|
180
|
+
|
181
|
+
UserDatabaseRealm to authenticate users
|
182
|
+
|
183
|
+
-->
|
184
|
+
|
185
|
+
<Resource name="UserDatabase" auth="Container"
|
186
|
+
|
187
|
+
type="org.apache.catalina.UserDatabase"
|
188
|
+
|
189
|
+
description="User database that can be updated and saved"
|
190
|
+
|
191
|
+
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
|
192
|
+
|
193
|
+
pathname="conf/tomcat-users.xml" />
|
194
|
+
|
195
|
+
<Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" initialSize="5" maxIdle="5" maxTotal="5" maxWaitMillis="5000" name="jdbc/db_shift" password="m9wim6YM9wim6y-" type="javax.sql.DataSource" url="jdbc:mysql://13.250.157.201:3306/db_shift?serverTimezone=JST" username="admin"/>
|
196
|
+
|
197
|
+
</GlobalNamingResources>
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
<!-- A "Service" is a collection of one or more "Connectors" that share
|
202
|
+
|
203
|
+
a single "Container" Note: A "Service" is not itself a "Container",
|
204
|
+
|
205
|
+
so you may not define subcomponents such as "Valves" at this level.
|
206
|
+
|
207
|
+
Documentation at /docs/config/service.html
|
208
|
+
|
209
|
+
-->
|
210
|
+
|
211
|
+
<Service name="Catalina">
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
|
216
|
+
|
217
|
+
<!--
|
218
|
+
|
219
|
+
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
|
220
|
+
|
221
|
+
maxThreads="150" minSpareThreads="4"/>
|
222
|
+
|
223
|
+
-->
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
<!-- A "Connector" represents an endpoint by which requests are received
|
230
|
+
|
231
|
+
and responses are returned. Documentation at :
|
232
|
+
|
233
|
+
Java HTTP Connector: /docs/config/http.html
|
234
|
+
|
235
|
+
Java AJP Connector: /docs/config/ajp.html
|
236
|
+
|
237
|
+
APR (HTTP/AJP) Connector: /docs/apr.html
|
238
|
+
|
239
|
+
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
|
240
|
+
|
241
|
+
-->
|
242
|
+
|
243
|
+
<Connector port="8080" protocol="HTTP/1.1"
|
244
|
+
|
245
|
+
connectionTimeout="20000"
|
246
|
+
|
247
|
+
redirectPort="8443" />
|
248
|
+
|
249
|
+
<!-- A "Connector" using the shared thread pool-->
|
250
|
+
|
251
|
+
<!--
|
252
|
+
|
253
|
+
<Connector executor="tomcatThreadPool"
|
254
|
+
|
255
|
+
port="8080" protocol="HTTP/1.1"
|
256
|
+
|
257
|
+
connectionTimeout="20000"
|
258
|
+
|
259
|
+
redirectPort="8443" />
|
260
|
+
|
261
|
+
-->
|
262
|
+
|
263
|
+
<!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
|
264
|
+
|
265
|
+
This connector uses the NIO implementation. The default
|
266
|
+
|
267
|
+
SSLImplementation will depend on the presence of the APR/native
|
268
|
+
|
269
|
+
library and the useOpenSSL attribute of the
|
270
|
+
|
271
|
+
AprLifecycleListener.
|
272
|
+
|
273
|
+
Either JSSE or OpenSSL style configuration may be used regardless of
|
274
|
+
|
275
|
+
the SSLImplementation selected. JSSE style configuration is used below.
|
276
|
+
|
277
|
+
-->
|
278
|
+
|
279
|
+
<!--
|
280
|
+
|
281
|
+
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
|
282
|
+
|
283
|
+
maxThreads="150" SSLEnabled="true">
|
284
|
+
|
285
|
+
<SSLHostConfig>
|
286
|
+
|
287
|
+
<Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
|
288
|
+
|
289
|
+
type="RSA" />
|
290
|
+
|
291
|
+
</SSLHostConfig>
|
292
|
+
|
293
|
+
</Connector>
|
294
|
+
|
295
|
+
-->
|
296
|
+
|
297
|
+
<!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
This connector uses the APR/native implementation which always uses
|
302
|
+
|
303
|
+
OpenSSL for TLS.
|
304
|
+
|
305
|
+
Either JSSE or OpenSSL style configuration may be used. OpenSSL style
|
306
|
+
|
307
|
+
configuration is used below.
|
308
|
+
|
309
|
+
-->
|
310
|
+
|
311
|
+
<!--
|
312
|
+
|
313
|
+
<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
|
314
|
+
|
315
|
+
maxThreads="150" SSLEnabled="true" >
|
316
|
+
|
317
|
+
<UpgradeProtocol className="org.apache.coyote.http4.Http2Protocol" />
|
318
|
+
|
319
|
+
<SSLHostConfig>
|
320
|
+
|
321
|
+
<Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
|
322
|
+
|
323
|
+
certificateFile="conf/localhost-rsa-cert.pem"
|
324
|
+
|
325
|
+
certificateChainFile="conf/localhost-rsa-chain.pem"
|
326
|
+
|
327
|
+
type="RSA" />
|
328
|
+
|
329
|
+
</SSLHostConfig>
|
330
|
+
|
331
|
+
</Connector>
|
332
|
+
|
333
|
+
-->
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
<!-- Define an AJP 1.3 Connector on port 8009 -->
|
338
|
+
|
339
|
+
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
<!-- An Engine represents the entry point (within Catalina) that processes
|
346
|
+
|
347
|
+
every request. The Engine implementation for Tomcat stand alone
|
348
|
+
|
349
|
+
analyzes the HTTP headers included with the request, and passes them
|
350
|
+
|
351
|
+
on to the appropriate Host (virtual host).
|
352
|
+
|
353
|
+
Documentation at /docs/config/engine.html -->
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
<!-- You should set jvmRoute to support load-balancing via AJP ie :
|
358
|
+
|
359
|
+
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
|
360
|
+
|
361
|
+
-->
|
362
|
+
|
363
|
+
<Engine name="Catalina" defaultHost="localhost">
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
<!--For clustering, please take a look at documentation at:
|
368
|
+
|
369
|
+
/docs/cluster-howto.html (simple how to)
|
370
|
+
|
371
|
+
/docs/config/cluster.html (reference documentation) -->
|
372
|
+
|
373
|
+
<!--
|
374
|
+
|
375
|
+
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
|
376
|
+
|
377
|
+
-->
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
|
382
|
+
|
383
|
+
via a brute-force attack -->
|
384
|
+
|
385
|
+
<Realm className="org.apache.catalina.realm.LockOutRealm">
|
386
|
+
|
387
|
+
<!-- This Realm uses the UserDatabase configured in the global JNDI
|
388
|
+
|
389
|
+
resources under the key "UserDatabase". Any edits
|
390
|
+
|
391
|
+
that are performed against this UserDatabase are immediately
|
392
|
+
|
393
|
+
available for use by the Realm. -->
|
394
|
+
|
395
|
+
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
|
396
|
+
|
397
|
+
resourceName="UserDatabase"/>
|
398
|
+
|
399
|
+
</Realm>
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
<Host name="localhost" appBase="webapps"
|
404
|
+
|
405
|
+
unpackWARs="true" autoDeploy="true">
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
<!-- SingleSignOn valve, share authentication between web applications
|
410
|
+
|
411
|
+
Documentation at: /docs/config/valve.html -->
|
412
|
+
|
413
|
+
<!--
|
414
|
+
|
415
|
+
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
|
416
|
+
|
417
|
+
-->
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
<!-- Access log processes all example.
|
422
|
+
|
423
|
+
Documentation at: /docs/config/valve.html
|
424
|
+
|
425
|
+
Note: The pattern used is equivalent to using pattern="common" -->
|
426
|
+
|
427
|
+
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
|
428
|
+
|
429
|
+
prefix="localhost_access_log" suffix=".txt"
|
430
|
+
|
431
|
+
pattern="%h %l %u %t "%r" %s %b" />
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
</Host>
|
436
|
+
|
437
|
+
</Engine>
|
438
|
+
|
439
|
+
</Service>
|
440
|
+
|
441
|
+
</Server>
|