質問編集履歴
9
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -346,7 +346,7 @@
|
|
346
346
|
|
347
347
|
I, [2021-05-07T14:35:51.235962 #3443] INFO -- : Refreshing Gem list
|
348
348
|
|
349
|
-
I, [2021-05-07T14:35:53.728166 #3443] INFO -- : unlinking existing socket=/var/www/rails/
|
349
|
+
I, [2021-05-07T14:35:53.728166 #3443] INFO -- : unlinking existing socket=/var/www/rails/アプリ名/tmp/sockets/.unicorn.sock
|
350
350
|
|
351
351
|
I, [2021-05-07T14:35:53.728336 #3443] INFO -- : listening on addr=/var/www/rails/アプリ名/tmp/sockets/.unicorn.sock fd=9
|
352
352
|
|
8
【補足2】unicornのログの状況 を修正 ログを長めにだしました。
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
nginx
|
1
|
+
nginxの起動に失敗し、ブラウザにアプリが表示がされない原因が知りたい
|
test
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
プログラミング初心者です。
|
4
4
|
|
5
|
-
$ sudo service nginx start
|
5
|
+
$ sudo service nginx startの実行に失敗し、アプリがブラウザ上に表示されません。
|
6
6
|
|
7
7
|
ブラウザのアドレス欄には、以下のとおり入力しました。
|
8
8
|
|
@@ -14,19 +14,13 @@
|
|
14
14
|
|
15
15
|
|
16
16
|
|
17
|
-
どうしてブラウザ上に表示されないの
|
17
|
+
どうしてブラウザ上に表示されないのでしょうか。
|
18
|
-
|
18
|
+
|
19
|
-
以下に情報を記載させていただきますので、
|
19
|
+
以下に情報を記載させていただきますので、お気づきの点がございましたらご教示いただけますと幸いです。
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
20
|
+
|
21
|
+
|
22
|
+
|
29
|
-
### $ sudo nginx -t
|
23
|
+
### $ sudo nginx -t 実行結果
|
30
24
|
|
31
25
|
```ここに言語を入力
|
32
26
|
|
@@ -38,17 +32,7 @@
|
|
38
32
|
|
39
33
|
|
40
34
|
|
41
|
-
### $ systemctl status firewalldを実行した結果
|
42
|
-
|
43
|
-
```ここに言語を入力
|
44
|
-
|
45
|
-
Unit firewalld.service could not be found.
|
46
|
-
|
47
|
-
```
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
### $ ps -ef | grep unicorn | grep -v grep
|
35
|
+
### $ ps -ef | grep unicorn | grep -v grep 実行結果
|
52
36
|
|
53
37
|
```ここに言語を入力
|
54
38
|
|
@@ -62,7 +46,7 @@
|
|
62
46
|
|
63
47
|
|
64
48
|
|
65
|
-
### $ curl http://127.0.0.1/
|
49
|
+
### $ curl http://127.0.0.1/ 実行結果
|
66
50
|
|
67
51
|
```ここに言語を入力
|
68
52
|
|
@@ -110,7 +94,7 @@
|
|
110
94
|
|
111
95
|
|
112
96
|
|
113
|
-
### http://xx.xxx.xx.xx/(Elastic IP アドレス)
|
97
|
+
### http://xx.xxx.xx.xx/(Elastic IP アドレス) 実行結果
|
114
98
|
|
115
99
|
|
116
100
|
|
@@ -142,81 +126,9 @@
|
|
142
126
|
|
143
127
|
|
144
128
|
|
145
|
-
④EC2のシステムログ
|
146
|
-
|
147
|
-
```ここに言語を入力
|
148
|
-
|
149
|
-
[ 1.534066] systemd[1]: Inserted module 'autofs4'
|
150
|
-
|
151
|
-
[ 1.553417] NET: Registered protocol family 10
|
152
|
-
|
153
|
-
[ 1.560335] Segment Routing with IPv6
|
154
|
-
|
155
|
-
[ 1.564621] systemd[1]: Inserted module 'ipv6'
|
156
|
-
|
157
|
-
[ 1.570486] random: systemd: uninitialized urandom read (16 bytes read)
|
158
|
-
|
159
|
-
[ 1.578054] random: systemd: uninitialized urandom read (16 bytes read)
|
160
|
-
|
161
|
-
[ 1.584941] random: systemd: uninitialized urandom read (16 bytes read)
|
162
|
-
|
163
|
-
[ 1.593304] systemd[1]: systemd 219 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
|
164
|
-
|
165
|
-
[ 1.621080] systemd[1]: Detected virtualization xen.
|
166
|
-
|
167
|
-
[ 1.627380] systemd[1]: Detected architecture x86-64.
|
168
|
-
|
169
|
-
[ 1.633814] systemd[1]: Running in initial RAM disk.
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
Welcome to [0;34mAmazon Linux 2 dracut-033-535.amzn2.1.3 (Initramfs)[0m!
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
.
|
178
|
-
|
179
|
-
.
|
180
|
-
|
181
|
-
.
|
182
|
-
|
183
|
-
.
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
2021/05/08 18:21:50Z: OsVersion: 2
|
190
|
-
|
191
|
-
[ 11.136038] cloud-init[3142]: Cloud-init v. 19.3-43.amzn2 running 'modules:final' at Sat, 08 May 2021 18:21:51 +0000. Up 11.00 seconds.
|
192
|
-
|
193
|
-
[ 11.167737] cloud-init[3142]: Cloud-init v. 19.3-43.amzn2 finished at Sat, 08 May 2021 18:21:51 +0000. Datasource DataSourceEc2. Up 11.15 seconds
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
Amazon Linux 2
|
198
|
-
|
199
|
-
Kernel 4.14.231-173.361.amzn2.x86_64 on an x86_64
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
ip-10-0-0-248 login:
|
204
|
-
|
205
|
-
```
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
⑤インスタンスのスクリーンショット
|
212
|
-
|
213
|
-
![![イメージ説明](43d9a78a1f6addc0b0a9778043bc2f32.jpeg)]
|
214
|
-
|
215
|
-
|
216
|
-
|
217
129
|
### /etc/nginx/conf.d/アプリ名.confの中身
|
218
130
|
|
219
|
-
```
|
131
|
+
```
|
220
132
|
|
221
133
|
# log directory
|
222
134
|
|
@@ -240,7 +152,7 @@
|
|
240
152
|
|
241
153
|
upstream unicorn {
|
242
154
|
|
243
|
-
server unix:/var/www/rails/アプリ名/tmp/unicorn.sock;
|
155
|
+
server unix:/var/www/rails/アプリ名/tmp/sockets/unicorn.sock;
|
244
156
|
|
245
157
|
}
|
246
158
|
|
@@ -294,45 +206,13 @@
|
|
294
206
|
|
295
207
|
error_page 500 502 503 504 /500.html;
|
296
208
|
|
297
|
-
"アプリ名.conf" 42L, 1217C
|
298
|
-
|
299
|
-
```
|
209
|
+
```
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
210
|
+
|
304
|
-
|
305
|
-
|
211
|
+
|
306
|
-
|
307
|
-
|
212
|
+
|
308
|
-
|
309
|
-
access_log /var/log/nginx/access.log;
|
310
|
-
|
311
|
-
error_log /var/log/nginx/error.log;
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
root /var/www/rails/アプリ名/public;
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
client_max_body_size 100m;
|
320
|
-
|
321
|
-
error_page 404 /404.html;
|
322
|
-
|
323
|
-
error_page 500 502 503 504 /500.html;
|
324
|
-
|
325
|
-
try_files $uri/index.html $uri @unicorn;
|
326
|
-
|
327
|
-
}
|
328
|
-
|
329
|
-
```
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
### 【補足1】nginxのログ
|
213
|
+
### 【補足1】nginxのログ状況
|
334
|
-
|
214
|
+
|
335
|
-
$ sudo nano /var/log/nginx/access.log
|
215
|
+
$ sudo nano /var/log/nginx/access.log 実行結果
|
336
216
|
|
337
217
|
```ここに言語を入力
|
338
218
|
|
@@ -362,7 +242,7 @@
|
|
362
242
|
|
363
243
|
|
364
244
|
|
365
|
-
$ sudo service nginx status
|
245
|
+
$ sudo service nginx status 実行結果
|
366
246
|
|
367
247
|
```ここに言語を入力
|
368
248
|
|
@@ -402,61 +282,97 @@
|
|
402
282
|
|
403
283
|
|
404
284
|
|
405
|
-
### 【補足2】unicornのログ
|
285
|
+
### 【補足2】unicornのログ状況
|
406
286
|
|
407
287
|
|
408
288
|
|
409
289
|
/var/www/rails/アプリ名/log に移動し、
|
410
290
|
|
411
|
-
$ sudo
|
412
|
-
|
413
|
-
```ここに言語を入力
|
414
|
-
|
415
|
-
I, [2021-05-0
|
416
|
-
|
417
|
-
I, [2021-05-0
|
418
|
-
|
419
|
-
I, [2021-05-0
|
420
|
-
|
421
|
-
I, [2021-05-0
|
422
|
-
|
423
|
-
I, [2021-05-0
|
424
|
-
|
425
|
-
I, [2021-05-0
|
426
|
-
|
427
|
-
I, [2021-05-0
|
428
|
-
|
429
|
-
I, [2021-05-0
|
430
|
-
|
431
|
-
I, [2021-05-0
|
432
|
-
|
433
|
-
I, [2021-05-0
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
#
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
#
|
291
|
+
$ sudo less unicorn.logを実行した結果
|
292
|
+
|
293
|
+
```ここに言語を入力
|
294
|
+
|
295
|
+
I, [2021-05-04T16:45:51.374358 #7310] INFO -- : Refreshing Gem list
|
296
|
+
|
297
|
+
I, [2021-05-04T16:45:53.511544 #7310] INFO -- : listening on addr=/var/www/rails/アプリ名/tmp/sockets/.unicorn.sock fd=9
|
298
|
+
|
299
|
+
I, [2021-05-04T16:45:53.517088 #7310] INFO -- : master process ready
|
300
|
+
|
301
|
+
I, [2021-05-04T16:45:53.521522 #7312] INFO -- : worker=0 ready
|
302
|
+
|
303
|
+
I, [2021-05-04T16:45:53.522770 #7313] INFO -- : worker=1 ready
|
304
|
+
|
305
|
+
I, [2021-05-05T04:19:37.632516 #7310] INFO -- : reaped #<Process::Status: pid 7312 exit 0> worker=0
|
306
|
+
|
307
|
+
I, [2021-05-05T04:19:37.634294 #7310] INFO -- : reaped #<Process::Status: pid 7313 exit 0> worker=1
|
308
|
+
|
309
|
+
I, [2021-05-05T04:19:37.634380 #7310] INFO -- : master complete
|
310
|
+
|
311
|
+
I, [2021-05-05T04:43:27.493213 #7551] INFO -- : Refreshing Gem list
|
312
|
+
|
313
|
+
I, [2021-05-05T04:43:30.223796 #7551] INFO -- : unlinking existing socket=/var/www/rails/アプリ名/tmp/sockets/.unicorn.sock
|
314
|
+
|
315
|
+
I, [2021-05-05T04:43:30.223963 #7551] INFO -- : listening on addr=/var/www/rails/アプリ名/tmp/sockets/.unicorn.sock fd=9
|
316
|
+
|
317
|
+
I, [2021-05-05T04:43:30.247530 #7551] INFO -- : master process ready
|
318
|
+
|
319
|
+
I, [2021-05-05T04:43:30.253070 #7555] INFO -- : worker=1 ready
|
320
|
+
|
321
|
+
I, [2021-05-05T04:43:30.253508 #7554] INFO -- : worker=0 ready
|
322
|
+
|
323
|
+
I, [2021-05-06T13:26:07.863029 #7551] INFO -- : reaped #<Process::Status: pid 7554 exit 0> worker=0
|
324
|
+
|
325
|
+
I, [2021-05-06T13:26:07.863371 #7551] INFO -- : reaped #<Process::Status: pid 7555 exit 0> worker=1
|
326
|
+
|
327
|
+
I, [2021-05-06T13:26:07.863439 #7551] INFO -- : master complete
|
328
|
+
|
329
|
+
I, [2021-05-06T15:10:40.684478 #3957] INFO -- : Refreshing Gem list
|
330
|
+
|
331
|
+
I, [2021-05-06T15:10:46.922051 #3957] INFO -- : unlinking existing socket=/var/www/rails/アプリ名/tmp/sockets/.unicorn.sock
|
332
|
+
|
333
|
+
I, [2021-05-06T15:10:46.922219 #3957] INFO -- : listening on addr=/var/www/rails/アプリ名/tmp/sockets/.unicorn.sock fd=9
|
334
|
+
|
335
|
+
I, [2021-05-06T15:10:46.939327 #3957] INFO -- : master process ready
|
336
|
+
|
337
|
+
I, [2021-05-06T15:10:46.943953 #3960] INFO -- : worker=0 ready
|
338
|
+
|
339
|
+
I, [2021-05-06T15:10:46.945229 #3961] INFO -- : worker=1 ready
|
340
|
+
|
341
|
+
I, [2021-05-07T14:10:30.770122 #3957] INFO -- : reaped #<Process::Status: pid 3960 exit 0> worker=0
|
342
|
+
|
343
|
+
I, [2021-05-07T14:10:30.770737 #3957] INFO -- : reaped #<Process::Status: pid 3961 exit 0> worker=1
|
344
|
+
|
345
|
+
I, [2021-05-07T14:10:30.770821 #3957] INFO -- : master complete
|
346
|
+
|
347
|
+
I, [2021-05-07T14:35:51.235962 #3443] INFO -- : Refreshing Gem list
|
348
|
+
|
349
|
+
I, [2021-05-07T14:35:53.728166 #3443] INFO -- : unlinking existing socket=/var/www/rails/my_portfolio4/tmp/sockets/.unicorn.sock
|
350
|
+
|
351
|
+
I, [2021-05-07T14:35:53.728336 #3443] INFO -- : listening on addr=/var/www/rails/アプリ名/tmp/sockets/.unicorn.sock fd=9
|
352
|
+
|
353
|
+
I, [2021-05-07T14:35:53.742418 #3443] INFO -- : master process ready
|
354
|
+
|
355
|
+
I, [2021-05-07T14:35:53.746745 #3447] INFO -- : worker=1 ready
|
356
|
+
|
357
|
+
I, [2021-05-07T14:35:53.748069 #3446] INFO -- : worker=0 ready
|
358
|
+
|
359
|
+
I, [2021-05-08T09:03:57.347631 #3443] INFO -- : reaped #<Process::Status: pid 3446 exit 0> worker=0
|
360
|
+
|
361
|
+
I, [2021-05-08T09:03:57.348178 #3443] INFO -- : reaped #<Process::Status: pid 3447 exit 0> worker=1
|
362
|
+
|
363
|
+
I, [2021-05-08T09:03:57.348261 #3443] INFO -- : master complete
|
364
|
+
|
365
|
+
I, [2021-05-08T10:32:02.517721 #3826] INFO -- : Refreshing Gem list
|
366
|
+
|
367
|
+
I, [2021-05-08T10:32:05.086000 #3826] INFO -- : unlinking existing socket=/var/www/rails/アプリ名/tmp/sockets/.unicorn.sock
|
368
|
+
|
369
|
+
I, [2021-05-08T10:32:05.086181 #3826] INFO -- : listening on addr=/var/www/rails/アプリ名/tmp/sockets/.unicorn.sock fd=9
|
370
|
+
|
371
|
+
```
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
### 【補足3】バージョン
|
460
376
|
|
461
377
|
```ここに言語を入力
|
462
378
|
|
7
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -434,7 +434,7 @@
|
|
434
434
|
|
435
435
|
```
|
436
436
|
|
437
|
-
### $ netstat -tlntを実行した結果
|
437
|
+
### 【補足3】$ netstat -tlntを実行した結果
|
438
438
|
|
439
439
|
```ここに言語を入力
|
440
440
|
|
6
ログについて詳しく記載させていただきました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -174,24 +174,6 @@
|
|
174
174
|
|
175
175
|
|
176
176
|
|
177
|
-
[ 1.647248] systemd[1]: No hostname configured.
|
178
|
-
|
179
|
-
[ 1.653022] systemd[1]: Set hostname to <localhost>.
|
180
|
-
|
181
|
-
[ 1.659201] systemd[1]: Initializing machine ID from random generator.
|
182
|
-
|
183
|
-
[[32m OK [0m] Reached target Local File Systems.
|
184
|
-
|
185
|
-
[ 1.699783] systemd[1]: Reached target Local File Systems.
|
186
|
-
|
187
|
-
[ 1.706604] systemd[1]: Starting Local File Systems.
|
188
|
-
|
189
|
-
[[32m OK [0m] Reached target Timers.
|
190
|
-
|
191
|
-
[ 1.718582] systemd[1]: Reached target Timers.
|
192
|
-
|
193
|
-
|
194
|
-
|
195
177
|
.
|
196
178
|
|
197
179
|
.
|
@@ -204,12 +186,6 @@
|
|
204
186
|
|
205
187
|
|
206
188
|
|
207
|
-
[ 10.035766] cloud-init[2992]: Cloud-init v. 19.3-43.amzn2 running 'modules:config' at Sat, 08 May 2021 18:21:49 +0000. Up 9.88 seconds.
|
208
|
-
|
209
|
-
2021/05/08 18:21:50Z: Amazon SSM Agent v3.0.529.0 is running
|
210
|
-
|
211
|
-
2021/05/08 18:21:50Z: OsProductName: Amazon Linux
|
212
|
-
|
213
189
|
2021/05/08 18:21:50Z: OsVersion: 2
|
214
190
|
|
215
191
|
[ 11.136038] cloud-init[3142]: Cloud-init v. 19.3-43.amzn2 running 'modules:final' at Sat, 08 May 2021 18:21:51 +0000. Up 11.00 seconds.
|
@@ -356,7 +332,7 @@
|
|
356
332
|
|
357
333
|
### 【補足1】nginxのログの状況
|
358
334
|
|
359
|
-
$ sudo nano /var/log/nginx/access.log
|
335
|
+
$ sudo nano /var/log/nginx/access.logを実行した結果
|
360
336
|
|
361
337
|
```ここに言語を入力
|
362
338
|
|
@@ -386,11 +362,41 @@
|
|
386
362
|
|
387
363
|
|
388
364
|
|
389
|
-
$ sudo
|
365
|
+
$ sudo service nginx statusを実行した結果
|
390
|
-
|
366
|
+
|
391
|
-
```ここに言語を入力
|
367
|
+
```ここに言語を入力
|
368
|
+
|
392
|
-
|
369
|
+
Redirecting to /bin/systemctl status nginx.service
|
370
|
+
|
371
|
+
● nginx.service - The nginx HTTP and reverse proxy server
|
372
|
+
|
373
|
+
Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
|
374
|
+
|
375
|
+
Active: inactive (dead)
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
5月 10 14:23:27 ip-10-0-0-248.ap-northeast-1.compute.internal systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
|
380
|
+
|
381
|
+
5月 10 14:23:27 ip-10-0-0-248.ap-northeast-1.compute.internal systemd[1]: Unit nginx.service entered failed state.
|
382
|
+
|
383
|
+
5月 10 14:23:27 ip-10-0-0-248.ap-northeast-1.compute.internal systemd[1]: nginx.service failed.
|
384
|
+
|
385
|
+
5月 10 14:26:24 ip-10-0-0-248.ap-northeast-1.compute.internal systemd[1]: Starting The nginx HTTP and reverse proxy server...
|
386
|
+
|
393
|
-
|
387
|
+
5月 10 14:26:24 ip-10-0-0-248.ap-northeast-1.compute.internal nginx[20542]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
|
388
|
+
|
389
|
+
5月 10 14:26:24 ip-10-0-0-248.ap-northeast-1.compute.internal nginx[20542]: nginx: configuration file /etc/nginx/nginx.conf test is su...sful
|
390
|
+
|
391
|
+
5月 10 14:26:24 ip-10-0-0-248.ap-northeast-1.compute.internal systemd[1]: Failed to read PID from file /run/nginx.pid: Invalid argument
|
392
|
+
|
393
|
+
5月 10 14:26:24 ip-10-0-0-248.ap-northeast-1.compute.internal systemd[1]: Started The nginx HTTP and reverse proxy server.
|
394
|
+
|
395
|
+
5月 10 15:29:29 ip-10-0-0-248.ap-northeast-1.compute.internal systemd[1]: Stopping The nginx HTTP and reverse proxy server...
|
396
|
+
|
397
|
+
5月 10 15:29:29 ip-10-0-0-248.ap-northeast-1.compute.internal systemd[1]: Stopped The nginx HTTP and reverse proxy server.
|
398
|
+
|
399
|
+
Hint: Some lines were ellipsized, use -l to show in full.
|
394
400
|
|
395
401
|
```
|
396
402
|
|
@@ -428,11 +434,29 @@
|
|
428
434
|
|
429
435
|
```
|
430
436
|
|
431
|
-
|
437
|
+
### $ netstat -tlntを実行した結果
|
438
|
+
|
432
|
-
|
439
|
+
```ここに言語を入力
|
440
|
+
|
433
|
-
|
441
|
+
Active Internet connections (only servers)
|
442
|
+
|
434
|
-
|
443
|
+
Proto Recv-Q Send-Q Local Address Foreign Address State
|
444
|
+
|
445
|
+
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
|
446
|
+
|
447
|
+
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
|
448
|
+
|
449
|
+
tcp6 0 0 :::3306 :::* LISTEN
|
450
|
+
|
451
|
+
tcp6 0 0 :::111 :::* LISTEN
|
452
|
+
|
453
|
+
tcp6 0 0 :::22 :::* LISTEN
|
454
|
+
|
455
|
+
```
|
456
|
+
|
457
|
+
|
458
|
+
|
435
|
-
### 【補足
|
459
|
+
### 【補足4】ツールのバージョンなど
|
436
460
|
|
437
461
|
```ここに言語を入力
|
438
462
|
|
5
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -430,13 +430,9 @@
|
|
430
430
|
|
431
431
|
|
432
432
|
|
433
|
-
|
433
|
+
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
434
|
+
|
439
|
-
### 【補足
|
435
|
+
### 【補足3】ツールのバージョンなど
|
440
436
|
|
441
437
|
```ここに言語を入力
|
442
438
|
|
4
所属するサブネットのルートテーブルについても記載
test
CHANGED
File without changes
|
test
CHANGED
@@ -136,7 +136,13 @@
|
|
136
136
|
|
137
137
|
|
138
138
|
|
139
|
+
③所属するサブネットのルートテーブル
|
140
|
+
|
141
|
+
![イメージ説明](e5cb40b646053b3de048aa51258003bb.png)
|
142
|
+
|
143
|
+
|
144
|
+
|
139
|
-
|
145
|
+
④EC2のシステムログ
|
140
146
|
|
141
147
|
```ここに言語を入力
|
142
148
|
|
@@ -226,7 +232,7 @@
|
|
226
232
|
|
227
233
|
|
228
234
|
|
229
|
-
|
235
|
+
⑤インスタンスのスクリーンショット
|
230
236
|
|
231
237
|
![![イメージ説明](43d9a78a1f6addc0b0a9778043bc2f32.jpeg)]
|
232
238
|
|
@@ -424,7 +430,13 @@
|
|
424
430
|
|
425
431
|
|
426
432
|
|
433
|
+
### 【補足3】所属するサブネットのルートテーブル
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
|
427
|
-
### 【補足
|
439
|
+
### 【補足4】ツールのバージョンなど
|
428
440
|
|
429
441
|
```ここに言語を入力
|
430
442
|
|
3
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -350,7 +350,7 @@
|
|
350
350
|
|
351
351
|
### 【補足1】nginxのログの状況
|
352
352
|
|
353
|
-
$ sudo nano /var/log/nginx/access.log (
|
353
|
+
$ sudo nano /var/log/nginx/access.log (アクセスログ確認コマンド)を実行した結果
|
354
354
|
|
355
355
|
```ここに言語を入力
|
356
356
|
|
2
補足情報追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -184,114 +184,6 @@
|
|
184
184
|
|
185
185
|
[ 1.718582] systemd[1]: Reached target Timers.
|
186
186
|
|
187
|
-
[[32m OK [0m] Created slice Root Slice.
|
188
|
-
|
189
|
-
[[32m OK [0m] Listening on Journal Socket.
|
190
|
-
|
191
|
-
[[32m OK [0m] Listening on udev Control Socket.
|
192
|
-
|
193
|
-
[[32m OK [0m] Created slice System Slice.
|
194
|
-
|
195
|
-
Starting Journal Service...
|
196
|
-
|
197
|
-
[[32m OK [0m] Listening on udev Kernel Socket.
|
198
|
-
|
199
|
-
[[32m OK [0m] Reached target Swap.
|
200
|
-
|
201
|
-
[[32m OK [0m] Reached target Sockets.
|
202
|
-
|
203
|
-
[[32m OK [0m] Reached target Paths.
|
204
|
-
|
205
|
-
Starting Create list of required st... nodes for the current kernel...
|
206
|
-
|
207
|
-
[[32m OK [0m] Reached target Slices.
|
208
|
-
|
209
|
-
Starting Apply Kernel Variables...
|
210
|
-
|
211
|
-
[[32m OK [0m] Started Journal Service.
|
212
|
-
|
213
|
-
[[32m OK [0m] Started Create list of required sta...ce nodes for the current kernel.
|
214
|
-
|
215
|
-
[[32m OK [0m] Started Apply Kernel Variables.
|
216
|
-
|
217
|
-
Starting Create Static Device Nodes in /dev...
|
218
|
-
|
219
|
-
[ 1.856070] tsc: Refined TSC clocksource calibration: 2400.026 MHz
|
220
|
-
|
221
|
-
[ 1.862427] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x229850030f8, max_idle_ns: 440795254466 ns
|
222
|
-
|
223
|
-
[[32m OK [0m] Started Create Static Device Nodes in /dev.
|
224
|
-
|
225
|
-
Starting udev Kernel Device Manager...
|
226
|
-
|
227
|
-
[[32m OK [0m] Started udev Kernel Device Manager.
|
228
|
-
|
229
|
-
Starting dracut pre-trigger hook...
|
230
|
-
|
231
|
-
[[32m OK [0m] Started dracut pre-trigger hook.
|
232
|
-
|
233
|
-
Starting udev Coldplug all Devices...
|
234
|
-
|
235
|
-
[[32m OK [0m] Started udev Coldplug all Devices.
|
236
|
-
|
237
|
-
Starting dracut initqueue hook...
|
238
|
-
|
239
|
-
[[32m OK [0m] Reached target System Initialization.
|
240
|
-
|
241
|
-
[[32m OK [0m] Reached target Basic System.
|
242
|
-
|
243
|
-
[ 2.029843] SCSI subsystem initialized
|
244
|
-
|
245
|
-
[ 2.055541] Invalid max_queues (4), will use default max: 1.
|
246
|
-
|
247
|
-
[ 2.072655] scsi host0: ata_piix
|
248
|
-
|
249
|
-
[ 2.075892] scsi host1: ata_piix
|
250
|
-
|
251
|
-
[ 2.227135] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc100 irq 14
|
252
|
-
|
253
|
-
[ 2.233208] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc108 irq 15
|
254
|
-
|
255
|
-
[ 2.255984] blkfront: xvda: barrier or flush: disabled; persistent grants: disabled; indirect descriptors: enabled;
|
256
|
-
|
257
|
-
[ 2.275719] xvda: xvda1
|
258
|
-
|
259
|
-
[[32m OK [0m] Found device /dev/disk/by-uuid/2753b570-611a-44cb-8bd2-888283108b55.
|
260
|
-
|
261
|
-
Starting File System Check on /dev/...0-611a-44cb-8bd2-888283108b55...
|
262
|
-
|
263
|
-
[[32m OK [0m] Started File System Check on /dev/d...570-611a-44cb-8bd2-888283108b55.
|
264
|
-
|
265
|
-
[[32m OK [0m] Started dracut initqueue hook.
|
266
|
-
|
267
|
-
Mounting /sysroot...
|
268
|
-
|
269
|
-
[[32m OK [0m] Reached target Remote File Systems (Pre).
|
270
|
-
|
271
|
-
[[32m OK [0m] Reached target Remote File Systems.
|
272
|
-
|
273
|
-
[ 2.489197] SGI XFS with ACLs, security attributes, no debug enabled
|
274
|
-
|
275
|
-
[ 2.498793] XFS (xvda1): Mounting V5 Filesystem
|
276
|
-
|
277
|
-
[ 2.524543] XFS (xvda1): Ending clean mount
|
278
|
-
|
279
|
-
[[32m OK [0m] Mounted /sysroot.
|
280
|
-
|
281
|
-
[[32m OK [0m] Reached target Initrd Root File System.
|
282
|
-
|
283
|
-
Starting Reload Configuration from the Real Root...
|
284
|
-
|
285
|
-
[[32m OK [0m] Started Reload Configuration from the Real Root.
|
286
|
-
|
287
|
-
[[32m OK [0m] Reached target Initrd File Systems.
|
288
|
-
|
289
|
-
[[32m OK [0m] Reached target Initrd Default Target.
|
290
|
-
|
291
|
-
Starting dracut pre-pivot and cleanup hook...
|
292
|
-
|
293
|
-
[[32m OK [0m] Started dracut pre-pivot and cleanup hook.
|
294
|
-
|
295
187
|
|
296
188
|
|
297
189
|
.
|
@@ -456,9 +348,85 @@
|
|
456
348
|
|
457
349
|
|
458
350
|
|
351
|
+
### 【補足1】nginxのログの状況
|
352
|
+
|
353
|
+
$ sudo nano /var/log/nginx/access.log (nginxのアクセスログ確認コマンド)を実行した結果
|
354
|
+
|
355
|
+
```ここに言語を入力
|
356
|
+
|
357
|
+
111.239.181.40 - - [09/May/2021:11:17:42 +0000] "GET / HTTP/1.1" 301 5 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36$
|
358
|
+
|
359
|
+
188.166.70.83 - - [09/May/2021:11:20:20 +0000] "GET / HTTP/1.0" 500 1635 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/2010010$
|
360
|
+
|
361
|
+
127.0.0.1 - - [09/May/2021:11:32:28 +0000] "GET / HTTP/1.1" 200 732 "-" "curl/7.61.1" "-"
|
362
|
+
|
363
|
+
188.166.70.83 - - [09/May/2021:11:48:07 +0000] "GET /_ignition/execute-solution HTTP/1.1" 301 5 "-" "python-requests/2.18.4" "-"
|
364
|
+
|
365
|
+
132.145.196.125 - - [09/May/2021:12:15:13 +0000] "POST / HTTP/1.1" 307 5 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like $
|
366
|
+
|
367
|
+
132.145.196.125 - - [09/May/2021:12:15:15 +0000] "GET /.env HTTP/1.1" 301 5 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, li$
|
368
|
+
|
369
|
+
124.219.132.185 - - [09/May/2021:12:35:52 +0000] "GET / HTTP/1.1" 301 5 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHT$
|
370
|
+
|
371
|
+
170.254.75.31 - - [09/May/2021:12:44:03 +0000] "GET / HTTP/1.1" 301 5 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like$
|
372
|
+
|
373
|
+
47.241.125.249 - - [09/May/2021:13:00:54 +0000] "\x05\x01\x00" 400 157 "-" "-" "-"
|
374
|
+
|
375
|
+
47.241.125.249 - - [09/May/2021:13:01:20 +0000] "GET http://passport.baidu.com/ HTTP/1.1" 200 732 "-" "-" "-"
|
376
|
+
|
377
|
+
47.241.125.249 - - [09/May/2021:13:02:16 +0000] "\x04\x01\x00Pg)\xA7\xEA\x00" 400 157 "-" "-" "-"
|
378
|
+
|
379
|
+
```
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
$ sudo nano /var/log/nginx/error.log(エラーログ確認コマンド)を実行した結果
|
384
|
+
|
385
|
+
```ここに言語を入力
|
386
|
+
|
387
|
+
2021/05/09 11:20:20 [error] 11227#0: *4 could not find named location "@unicorn", client: 188.166.70.83, server: , request: "GET / HTTP/1.0"
|
388
|
+
|
389
|
+
```
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
### 【補足2】unicornのログの状況
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
/var/www/rails/アプリ名/log に移動し、
|
398
|
+
|
399
|
+
$ sudo tail unicorn.log(最新10行のログ確認コマンド)を実行した結果
|
400
|
+
|
401
|
+
```ここに言語を入力
|
402
|
+
|
403
|
+
I, [2021-05-08T17:43:30.984050 #4428] INFO -- : worker=0 ready
|
404
|
+
|
405
|
+
I, [2021-05-08T17:43:30.985252 #4429] INFO -- : worker=1 ready
|
406
|
+
|
407
|
+
I, [2021-05-08T18:20:29.354874 #4425] INFO -- : reaped #<Process::Status: pid 4428 exit 0> worker=0
|
408
|
+
|
409
|
+
I, [2021-05-08T18:20:29.354950 #4425] INFO -- : reaped #<Process::Status: pid 4429 exit 0> worker=1
|
410
|
+
|
411
|
+
I, [2021-05-08T18:20:29.355014 #4425] INFO -- : master complete
|
412
|
+
|
413
|
+
I, [2021-05-08T19:24:42.486318 #4290] INFO -- : Refreshing Gem list
|
414
|
+
|
415
|
+
I, [2021-05-08T19:24:44.942332 #4290] INFO -- : listening on addr=/var/www/rails/アプリ名/tmp/sockets/unicorn.sock fd=9
|
416
|
+
|
417
|
+
I, [2021-05-08T19:24:44.957852 #4290] INFO -- : master process ready
|
418
|
+
|
419
|
+
I, [2021-05-08T19:24:44.962589 #4293] INFO -- : worker=0 ready
|
420
|
+
|
421
|
+
I, [2021-05-08T19:24:44.964148 #4294] INFO -- : worker=1 ready
|
422
|
+
|
423
|
+
```
|
424
|
+
|
425
|
+
|
426
|
+
|
459
|
-
### 補足
|
427
|
+
### 【補足3】ツールのバージョンなど
|
428
|
+
|
460
|
-
|
429
|
+
```ここに言語を入力
|
461
|
-
|
462
430
|
|
463
431
|
macOs Catalina 10.15.7
|
464
432
|
|
@@ -470,6 +438,8 @@
|
|
470
438
|
|
471
439
|
Ruby 2.7.2p137
|
472
440
|
|
441
|
+
```
|
442
|
+
|
473
443
|
|
474
444
|
|
475
445
|
以上になります。
|
1
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -428,6 +428,8 @@
|
|
428
428
|
|
429
429
|
### /etc/nginx/conf.d/rails.confの中身
|
430
430
|
|
431
|
+
```
|
432
|
+
|
431
433
|
server {
|
432
434
|
|
433
435
|
access_log /var/log/nginx/access.log;
|
@@ -450,6 +452,8 @@
|
|
450
452
|
|
451
453
|
}
|
452
454
|
|
455
|
+
```
|
456
|
+
|
453
457
|
|
454
458
|
|
455
459
|
### 補足情報(FW/ツールのバージョンなど)
|