質問編集履歴
5
本文修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -219,12 +219,12 @@
|
|
219
219
|
$ cat access.log
|
220
220
|
|
221
221
|
210.170.174.207 - - [06/May/2022:11:22:43 +0000] "GET / HTTP/1.1" 500 1635 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36" "-"
|
222
|
-
210.170.174.207 - - [06/May/2022:11:22:43 +0000] "GET /favicon.ico HTTP/1.1" 304 0 "http://
|
222
|
+
210.170.174.207 - - [06/May/2022:11:22:43 +0000] "GET /favicon.ico HTTP/1.1" 304 0 "http://my_app.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36" "-"
|
223
223
|
|
224
224
|
$ cat error.log
|
225
225
|
<なし>
|
226
226
|
|
227
|
-
$ cat /var/www/
|
227
|
+
$ cat /var/www/my_app/src/log/production.log
|
228
228
|
|
229
229
|
I, [2022-05-06T11:22:43.539910 #589] INFO -- : [f23eb******1b072] Started GET "/" for 210.***.***.207 at 2022-05-06 11:22:43 +0000
|
230
230
|
I, [2022-05-06T11:22:43.546294 #589] INFO -- : [f23eb******1b072] Processing by Users::SessionsController#new as HTML
|
4
nginxとrailsのログ取り直し
test
CHANGED
File without changes
|
test
CHANGED
@@ -174,7 +174,7 @@
|
|
174
174
|
お手数ですが、解決へのヒントをいただけないでしょうか。
|
175
175
|
よろしくお願いします。
|
176
176
|
|
177
|
-
## 追記
|
177
|
+
## 追記1
|
178
178
|
Railsaのエラーログが出ていました。
|
179
179
|
`application.html.erb`をrenderするときに 500エラー が出ていました。Nginx => Puma の接続はうまくいっているということでしょうか。
|
180
180
|
ログを見ると、多分tailwindが悪さをしています。そしてなぜかwordpressのページにアクセスしているが、wordpress使ったことない...
|
@@ -209,3 +209,41 @@
|
|
209
209
|
[5d3d9*********78aee]
|
210
210
|
I, [2022-05-06T04:16:31.924361 #25092] INFO -- : [16742*********3549d] Started GET "/wordpress/wp-includes/wlwmanifest.xml" for 172.***.***.*** at 2022-05-06 04:16:31 +0000
|
211
211
|
```
|
212
|
+
|
213
|
+
|
214
|
+
## 追記2
|
215
|
+
nginxとrails、同アクセスのログを取り直しました。
|
216
|
+
`app/views/layouts/application.html.erb:9`
|
217
|
+
でエラーが出ていました。
|
218
|
+
```bash
|
219
|
+
$ cat access.log
|
220
|
+
|
221
|
+
210.170.174.207 - - [06/May/2022:11:22:43 +0000] "GET / HTTP/1.1" 500 1635 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36" "-"
|
222
|
+
210.170.174.207 - - [06/May/2022:11:22:43 +0000] "GET /favicon.ico HTTP/1.1" 304 0 "http://hangartalk-app.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36" "-"
|
223
|
+
|
224
|
+
$ cat error.log
|
225
|
+
<なし>
|
226
|
+
|
227
|
+
$ cat /var/www/hangartalk/src/log/production.log
|
228
|
+
|
229
|
+
I, [2022-05-06T11:22:43.539910 #589] INFO -- : [f23eb******1b072] Started GET "/" for 210.***.***.207 at 2022-05-06 11:22:43 +0000
|
230
|
+
I, [2022-05-06T11:22:43.546294 #589] INFO -- : [f23eb******1b072] Processing by Users::SessionsController#new as HTML
|
231
|
+
I, [2022-05-06T11:22:43.548823 #589] INFO -- : [f23eb******1b072] Rendered users/sessions/new.html.erb within layouts/application (Duration: 1.2ms | Allocations: 622)
|
232
|
+
I, [2022-05-06T11:22:43.551109 #589] INFO -- : [f23eb******1b072] Rendered layout layouts/application.html.erb (Duration: 3.5ms | Allocations: 3793)
|
233
|
+
I, [2022-05-06T11:22:43.551258 #589] INFO -- : [f23eb******1b072] Completed 500 Internal Server Error in 5ms (Allocations: 4409)
|
234
|
+
F, [2022-05-06T11:22:43.551993 #589] FATAL -- : [f23eb******1b072]
|
235
|
+
[f23eb******1b072] ActionView::Template::Error (The asset "tailwind.css" is not present in the asset pipeline.
|
236
|
+
):
|
237
|
+
[f23eb******1b072] 6: <meta name="viewport" content="width=device-width,initial-scale=1">
|
238
|
+
[f23eb******1b072] 7: <%= csrf_meta_tags %>
|
239
|
+
[f23eb******1b072] 8: <%= csp_meta_tag %>
|
240
|
+
[f23eb******1b072] 9: <%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>
|
241
|
+
[f23eb******1b072] 10:
|
242
|
+
[f23eb******1b072] 11: <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
243
|
+
[f23eb******1b072] 12: <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
|
244
|
+
[f23eb******1b072]
|
245
|
+
[f23eb******1b072] app/views/layouts/application.html.erb:9
|
246
|
+
```
|
247
|
+
また、ブラウザからアクセスした時の表示が「We're sorry, but something went wrong.」に変わりました。
|
248
|
+
![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-05-06/83781ec3-c6a6-429e-957c-6b8319e26e49.png)
|
249
|
+
|
3
Railsエラーログの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -173,3 +173,39 @@
|
|
173
173
|
|
174
174
|
お手数ですが、解決へのヒントをいただけないでしょうか。
|
175
175
|
よろしくお願いします。
|
176
|
+
|
177
|
+
## 追記
|
178
|
+
Railsaのエラーログが出ていました。
|
179
|
+
`application.html.erb`をrenderするときに 500エラー が出ていました。Nginx => Puma の接続はうまくいっているということでしょうか。
|
180
|
+
ログを見ると、多分tailwindが悪さをしています。そしてなぜかwordpressのページにアクセスしているが、wordpress使ったことない...
|
181
|
+
|
182
|
+
```bash
|
183
|
+
# src/log/production.log
|
184
|
+
|
185
|
+
I, [2022-05-06T04:16:31.459570 #25092] INFO -- : [0327e*********78e81] Started GET "/" for 172.***.***.*** at 2022-05-06 04:16:31 +0000
|
186
|
+
I, [2022-05-06T04:16:31.465913 #25092] INFO -- : [0327e*********78e81] Processing by Users::SessionsController#new as HTML
|
187
|
+
I, [2022-05-06T04:16:31.468518 #25092] INFO -- : [0327e*********78e81] Rendered users/sessions/new.html.erb within layouts/application (Duration: 1.3ms | Allocations: 622)
|
188
|
+
I, [2022-05-06T04:16:31.470831 #25092] INFO -- : [0327e*********78e81] Rendered layout layouts/application.html.erb (Duration: 3.7ms | Allocations: 3792)
|
189
|
+
I, [2022-05-06T04:16:31.470987 #25092] INFO -- : [0327e*********78e81] Completed 500 Internal Server Error in 5ms (Allocations: 4395)
|
190
|
+
F, [2022-05-06T04:16:31.471712 #25092] FATAL -- : [0327e*********78e81]
|
191
|
+
[0327e*********78e81] ActionView::Template::Error (The asset "tailwind.css" is not present in the asset pipeline.
|
192
|
+
):
|
193
|
+
[0327e*********78e81] 6: <meta name="viewport" content="width=device-width,initial-scale=1">
|
194
|
+
[0327e*********78e81] 7: <%= csrf_meta_tags %>
|
195
|
+
[0327e*********78e81] 8: <%= csp_meta_tag %>
|
196
|
+
[0327e*********78e81] 9: <%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>
|
197
|
+
[0327e*********78e81] 10:
|
198
|
+
[0327e*********78e81] 11: <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
199
|
+
[0327e*********78e81] 12: <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
|
200
|
+
[0327e*********78e81]
|
201
|
+
[0327e*********78e81] app/views/layouts/application.html.erb:9
|
202
|
+
I, [2022-05-06T04:16:31.616662 #25092] INFO -- : [101c3*********80f92] Started GET "/blog/wp-includes/wlwmanifest.xml" for 172.***.***.*** at 2022-05-06 04:16:31 +0000
|
203
|
+
F, [2022-05-06T04:16:31.622688 #25092] FATAL -- : [101c3*********80f92]
|
204
|
+
[101c3*********80f92] ActionController::RoutingError (No route matches [GET] "/blog/wp-includes/wlwmanifest.xml"):
|
205
|
+
[101c3*********80f92]
|
206
|
+
I, [2022-05-06T04:16:31.774667 #25092] INFO -- : [5d3d9*********78aee] Started GET "/web/wp-includes/wlwmanifest.xml" for 172.***.***.*** at 2022-05-06 04:16:31 +0000
|
207
|
+
F, [2022-05-06T04:16:31.780607 #25092] FATAL -- : [5d3d9*********78aee]
|
208
|
+
[5d3d9*********78aee] ActionController::RoutingError (No route matches [GET] "/web/wp-includes/wlwmanifest.xml"):
|
209
|
+
[5d3d9*********78aee]
|
210
|
+
I, [2022-05-06T04:16:31.924361 #25092] INFO -- : [16742*********3549d] Started GET "/wordpress/wp-includes/wlwmanifest.xml" for 172.***.***.*** at 2022-05-06 04:16:31 +0000
|
211
|
+
```
|
2
本文修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
+
EC2上にRailsアプリのデプロイを試みています。
|
2
|
+
|
1
|
-
|
3
|
+
ブラウザからアクセスすると、「このサイトにアクセスできません」と表示されて解決できずにいます。
|
2
4
|
|
3
5
|
ご助言をいただけると幸いです。
|
6
|
+
|
7
|
+
## 起きている問題
|
8
|
+
EC2にRailsアプリをデプロイ後、ブラウザから対象ドメインにアクセスしてもnginx => pumaの接続に失敗する。
|
4
9
|
|
5
10
|
## 前提事項
|
6
11
|
### 開発環境
|
1
タイトル修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
[
|
1
|
+
[AWS]EC2上でNginxからPuma(Ruby)への接続ができず、ブラウザに「このサイトにアクセスできません」と表示される
|
test
CHANGED
File without changes
|