質問編集履歴

6

修正

2019/10/25 12:22

投稿

motuni
motuni

スコア20

test CHANGED
File without changes
test CHANGED
@@ -496,7 +496,7 @@
496
496
 
497
497
 
498
498
 
499
- sudo pip install django-storagesコマンドを打つと以下のエラーが出ました。
499
+ sudo pip install django-storages コマンドを打つと以下のエラーが出ました。
500
500
 
501
501
  ```
502
502
 
@@ -514,7 +514,7 @@
514
514
 
515
515
  ```
516
516
 
517
- sudo pip install boto3コマンドを打つと以下の同じようなコードが出ます。
517
+ sudo pip install boto3 コマンドを打つと以下の同じようなコードが出ます。
518
518
 
519
519
  ```
520
520
 

5

修正

2019/10/25 12:21

投稿

motuni
motuni

スコア20

test CHANGED
File without changes
test CHANGED
@@ -514,7 +514,7 @@
514
514
 
515
515
  ```
516
516
 
517
- sudo pip install boto3」コマンドを打つと以下の同じようなコードが出ます。
517
+ sudo pip install boto3」コマンドを打つと以下の同じようなコードが出ます。
518
518
 
519
519
  ```
520
520
 

4

修正

2019/10/25 12:21

投稿

motuni
motuni

スコア20

test CHANGED
File without changes
test CHANGED
@@ -487,3 +487,55 @@
487
487
  52.41.225.107 - - [25/Oct/2019:06:00:53 +0000] "GET / HTTP/1.1" 502 182 "-" "Go-http-client/1.1"
488
488
 
489
489
  ```
490
+
491
+
492
+
493
+ 問題がある可能性があるための補足です。
494
+
495
+
496
+
497
+
498
+
499
+ 「sudo pip install django-storages」コマンドを打つと以下のエラーが出ました。
500
+
501
+ ```
502
+
503
+ WARNING: The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
504
+
505
+ WARNING: The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
506
+
507
+ Requirement already satisfied: django-storages in /usr/local/lib/python3.6/dist-packages (1.7.2)
508
+
509
+ Requirement already satisfied: Django>=1.11 in /usr/local/lib/python3.6/dist-packages (from django-storages) (2.2.6)
510
+
511
+ Requirement already satisfied: sqlparse in /usr/local/lib/python3.6/dist-packages (from Django>=1.11->django-storages) (0.3.0)
512
+
513
+ Requirement already satisfied: pytz in /usr/local/lib/python3.6/dist-packages (from Django>=1.11->django-storages) (2019.3)
514
+
515
+ ```
516
+
517
+ {sudo pip install boto3」コマンドを打つと以下の同じようなコードが出ます。
518
+
519
+ ```
520
+
521
+ WARNING: The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
522
+
523
+ WARNING: The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
524
+
525
+ Requirement already satisfied: boto3 in /usr/local/lib/python3.6/dist-packages (1.10.1)
526
+
527
+ Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /usr/local/lib/python3.6/dist-packages (from boto3) (0.9.4)
528
+
529
+ Requirement already satisfied: botocore<1.14.0,>=1.13.1 in /usr/local/lib/python3.6/dist-packages (from boto3) (1.13.1)
530
+
531
+ Requirement already satisfied: s3transfer<0.3.0,>=0.2.0 in /usr/local/lib/python3.6/dist-packages (from boto3) (0.2.1)
532
+
533
+ Requirement already satisfied: python-dateutil<3.0.0,>=2.1; python_version >= "2.7" in /usr/local/lib/python3.6/dist-packages (from botocore<1.14.0,>=1.13.1->boto3) (2.8.0)
534
+
535
+ Requirement already satisfied: urllib3<1.26,>=1.20; python_version >= "3.4" in /usr/lib/python3/dist-packages (from botocore<1.14.0,>=1.13.1->boto3) (1.22)
536
+
537
+ Requirement already satisfied: docutils<0.16,>=0.10 in /usr/local/lib/python3.6/dist-packages (from botocore<1.14.0,>=1.13.1->boto3) (0.15.2)
538
+
539
+ Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil<3.0.0,>=2.1; python_version >= "2.7"->botocore<1.14.0,>=1.13.1->boto3) (1.11.0)
540
+
541
+ ```

3

修正

2019/10/25 12:19

投稿

motuni
motuni

スコア20

test CHANGED
File without changes
test CHANGED
@@ -450,7 +450,7 @@
450
450
 
451
451
 
452
452
 
453
- 以下はnginxログの抜粋です。
453
+ 以下はnginxログ(ログ一番下)の抜粋です。
454
454
 
455
455
 
456
456
 

2

書式の改善

2019/10/25 11:57

投稿

motuni
motuni

スコア20

test CHANGED
File without changes
test CHANGED
@@ -447,3 +447,43 @@
447
447
 
448
448
 
449
449
  ここにより詳細な情報を記載してください。
450
+
451
+
452
+
453
+ 以下はnginxログの抜粋です。
454
+
455
+
456
+
457
+ error.log
458
+
459
+ ```
460
+
461
+ 2019/10/25 11:43:50 [crit] 3863#3863: *1 connect() to unix:/home/ubuntu/project4/project4.sock failed (2: No such file or directory) while connecting to upstream, client: IPアドレス, server: motuni.xyz, request: "GET / HTTP/1.1", upstream: "http://unix:/home/ubuntu/project4/project4.sock:/", host: "motuni.xyz"
462
+
463
+ ```
464
+
465
+ error.log.1
466
+
467
+ ```
468
+
469
+ 2019/10/25 06:00:53 [crit] 978#978: *15 connect() to unix:/home/ubuntu/project4/project4.sock failed (2: No such file or directory) while connecting to upstream, client: 52.41.225.107, server: motuni.xyz, request: "GET / HTTP/1.1", upstream: "http://unix:/home/ubuntu/project4/project4.sock:/", host: "motuni.xyz"
470
+
471
+ ```
472
+
473
+ access.log
474
+
475
+ ```
476
+
477
+ IPアドレス - - [25/Oct/2019:11:43:50 +0000] "GET / HTTP/1.1" 502 584 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36"
478
+
479
+ ```
480
+
481
+ access.log.1
482
+
483
+ ```
484
+
485
+ 159.203.201.77 - - [25/Oct/2019:05:07:03 +0000] "GET / HTTP/1.1" 200 396 "-" "Mozilla/5.0 zgrab/0.x"
486
+
487
+ 52.41.225.107 - - [25/Oct/2019:06:00:53 +0000] "GET / HTTP/1.1" 502 182 "-" "Go-http-client/1.1"
488
+
489
+ ```

1

HTMLの表記を消しました。

2019/10/25 11:52

投稿

motuni
motuni

スコア20

test CHANGED
File without changes
test CHANGED
@@ -364,7 +364,7 @@
364
364
 
365
365
  以下はurls.pyです。
366
366
 
367
- ```html
367
+ ```
368
368
 
369
369
 
370
370
 
@@ -410,7 +410,7 @@
410
410
 
411
411
  以下はbackends.pyです。backends.pyはsettings.pyと同じ階層(ディレクトリ)に置いてあります。
412
412
 
413
- ```html
413
+ ```
414
414
 
415
415
  from storages.backends.s3boto3 import S3Boto3Storage
416
416