質問編集履歴
2
固有名詞削除
test
CHANGED
File without changes
|
test
CHANGED
@@ -60,7 +60,7 @@
|
|
60
60
|
|
61
61
|
location /static/{
|
62
62
|
|
63
|
-
alias /home/e
|
63
|
+
alias /home/username/myproject/archifields/static/;
|
64
64
|
|
65
65
|
access_log /dev/null;
|
66
66
|
|
1
STATICDILES_DIRS追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -78,7 +78,9 @@
|
|
78
78
|
|
79
79
|
STATIC_URL = '/static/'
|
80
80
|
|
81
|
-
STATIC_R
|
81
|
+
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
|
82
|
+
|
83
|
+
STATIC_ROOT = '/var/www/mysite/static'
|
82
84
|
|
83
85
|
```
|
84
86
|
|
@@ -108,6 +110,48 @@
|
|
108
110
|
|
109
111
|
### 補足情報
|
110
112
|
|
113
|
+
|
114
|
+
|
115
|
+
エラーログを取ってみた所、このようなエラーが見つかりました。
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
```
|
120
|
+
|
121
|
+
$ tail -F /var/log/nginx/error.log
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
2019/12/09 17:59:10 [error] 30071#30071: *10003 open() "/home/myname/myproject/mysite/static/jet/css/themes/default/base.css" failed (2: No such file or directory), client: 118.4.219.217, server: www.mysite.com, request: "GET /static/jet/css/themes/default/base.css?v=1.0.10 HTTP/1.1", host: "www.mysite.com", referrer: "https://www.mysite.com/admin/"
|
126
|
+
|
127
|
+
```
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
これを見る限り、collectstaticがうまくいっていないのかなと思います。
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
collectstaticをすると、下記のエラーが生じます。
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
```
|
140
|
+
|
141
|
+
$ python manage.py collectstatic
|
142
|
+
|
143
|
+
Found another file with the destination path 'admin/css/forms.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
|
144
|
+
|
145
|
+
..............................
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
```
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
111
155
|
https://tell-k.github.io/djangocongressjp2019/
|
112
156
|
|
113
157
|
など、参考にしたのですが、どこを変えたら良いか分からないです。
|