質問編集履歴
6
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -247,7 +247,7 @@
|
|
247
247
|
問題がある可能性があるための補足です。
|
248
248
|
|
249
249
|
|
250
|
-
|
250
|
+
sudo pip install django-storages コマンドを打つと以下のエラーが出ました。
|
251
251
|
```
|
252
252
|
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.
|
253
253
|
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.
|
@@ -256,7 +256,7 @@
|
|
256
256
|
Requirement already satisfied: sqlparse in /usr/local/lib/python3.6/dist-packages (from Django>=1.11->django-storages) (0.3.0)
|
257
257
|
Requirement already satisfied: pytz in /usr/local/lib/python3.6/dist-packages (from Django>=1.11->django-storages) (2019.3)
|
258
258
|
```
|
259
|
-
sudo pip install boto3
|
259
|
+
sudo pip install boto3 コマンドを打つと以下の同じようなコードが出ます。
|
260
260
|
```
|
261
261
|
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.
|
262
262
|
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.
|
5
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -256,7 +256,7 @@
|
|
256
256
|
Requirement already satisfied: sqlparse in /usr/local/lib/python3.6/dist-packages (from Django>=1.11->django-storages) (0.3.0)
|
257
257
|
Requirement already satisfied: pytz in /usr/local/lib/python3.6/dist-packages (from Django>=1.11->django-storages) (2019.3)
|
258
258
|
```
|
259
|
-
|
259
|
+
sudo pip install boto3」コマンドを打つと以下の同じようなコードが出ます。
|
260
260
|
```
|
261
261
|
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.
|
262
262
|
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.
|
4
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -242,4 +242,30 @@
|
|
242
242
|
```
|
243
243
|
159.203.201.77 - - [25/Oct/2019:05:07:03 +0000] "GET / HTTP/1.1" 200 396 "-" "Mozilla/5.0 zgrab/0.x"
|
244
244
|
52.41.225.107 - - [25/Oct/2019:06:00:53 +0000] "GET / HTTP/1.1" 502 182 "-" "Go-http-client/1.1"
|
245
|
+
```
|
246
|
+
|
247
|
+
問題がある可能性があるための補足です。
|
248
|
+
|
249
|
+
|
250
|
+
「sudo pip install django-storages」コマンドを打つと以下のエラーが出ました。
|
251
|
+
```
|
252
|
+
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.
|
253
|
+
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.
|
254
|
+
Requirement already satisfied: django-storages in /usr/local/lib/python3.6/dist-packages (1.7.2)
|
255
|
+
Requirement already satisfied: Django>=1.11 in /usr/local/lib/python3.6/dist-packages (from django-storages) (2.2.6)
|
256
|
+
Requirement already satisfied: sqlparse in /usr/local/lib/python3.6/dist-packages (from Django>=1.11->django-storages) (0.3.0)
|
257
|
+
Requirement already satisfied: pytz in /usr/local/lib/python3.6/dist-packages (from Django>=1.11->django-storages) (2019.3)
|
258
|
+
```
|
259
|
+
{sudo pip install boto3」コマンドを打つと以下の同じようなコードが出ます。
|
260
|
+
```
|
261
|
+
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.
|
262
|
+
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.
|
263
|
+
Requirement already satisfied: boto3 in /usr/local/lib/python3.6/dist-packages (1.10.1)
|
264
|
+
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /usr/local/lib/python3.6/dist-packages (from boto3) (0.9.4)
|
265
|
+
Requirement already satisfied: botocore<1.14.0,>=1.13.1 in /usr/local/lib/python3.6/dist-packages (from boto3) (1.13.1)
|
266
|
+
Requirement already satisfied: s3transfer<0.3.0,>=0.2.0 in /usr/local/lib/python3.6/dist-packages (from boto3) (0.2.1)
|
267
|
+
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)
|
268
|
+
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)
|
269
|
+
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)
|
270
|
+
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)
|
245
271
|
```
|
3
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -224,7 +224,7 @@
|
|
224
224
|
|
225
225
|
ここにより詳細な情報を記載してください。
|
226
226
|
|
227
|
-
以下はnginxログの抜粋です。
|
227
|
+
以下はnginxログ(ログの一番下)の抜粋です。
|
228
228
|
|
229
229
|
error.log
|
230
230
|
```
|
2
書式の改善
title
CHANGED
File without changes
|
body
CHANGED
@@ -222,4 +222,24 @@
|
|
222
222
|
|
223
223
|
### 補足情報(FW/ツールのバージョンなど)
|
224
224
|
|
225
|
-
ここにより詳細な情報を記載してください。
|
225
|
+
ここにより詳細な情報を記載してください。
|
226
|
+
|
227
|
+
以下はnginxログの抜粋です。
|
228
|
+
|
229
|
+
error.log
|
230
|
+
```
|
231
|
+
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"
|
232
|
+
```
|
233
|
+
error.log.1
|
234
|
+
```
|
235
|
+
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"
|
236
|
+
```
|
237
|
+
access.log
|
238
|
+
```
|
239
|
+
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"
|
240
|
+
```
|
241
|
+
access.log.1
|
242
|
+
```
|
243
|
+
159.203.201.77 - - [25/Oct/2019:05:07:03 +0000] "GET / HTTP/1.1" 200 396 "-" "Mozilla/5.0 zgrab/0.x"
|
244
|
+
52.41.225.107 - - [25/Oct/2019:06:00:53 +0000] "GET / HTTP/1.1" 502 182 "-" "Go-http-client/1.1"
|
245
|
+
```
|
1
HTMLの表記を消しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -181,7 +181,7 @@
|
|
181
181
|
Python Django
|
182
182
|
|
183
183
|
以下はurls.pyです。
|
184
|
-
```
|
184
|
+
```
|
185
185
|
|
186
186
|
from django.contrib import admin
|
187
187
|
from django.urls import path, include
|
@@ -204,7 +204,7 @@
|
|
204
204
|
|
205
205
|
```
|
206
206
|
以下はbackends.pyです。backends.pyはsettings.pyと同じ階層(ディレクトリ)に置いてあります。
|
207
|
-
```
|
207
|
+
```
|
208
208
|
from storages.backends.s3boto3 import S3Boto3Storage
|
209
209
|
|
210
210
|
|