質問編集履歴
5
日本語の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -179,7 +179,7 @@
|
|
179
179
|
### AbeTakashi様のご回答のもとをにして、修正した結果。
|
180
180
|
|
181
181
|
修正方法
|
182
|
-
・nginx.confを※1のURLを修正
|
182
|
+
・nginx.confを※1のURLを参考にして修正
|
183
183
|
・healthのcheck pathを/nginxに修正
|
184
184
|
・nginxをsudo nginx -s reloadで再起動
|
185
185
|
|
4
ご回答者様のお名前を追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -176,7 +176,7 @@
|
|
176
176
|
下記URLを参照した際、記述ミスなのではないかと思った為。
|
177
177
|
https://cloudsmith.co.jp/blog/2022/02/2030266.html
|
178
178
|
|
179
|
-
###
|
179
|
+
### AbeTakashi様のご回答のもとをにして、修正した結果。
|
180
180
|
|
181
181
|
修正方法
|
182
182
|
・nginx.confを※1のURLを修正
|
3
ご回答いただいたものの実行してみた結果。
title
CHANGED
File without changes
|
body
CHANGED
@@ -176,8 +176,112 @@
|
|
176
176
|
下記URLを参照した際、記述ミスなのではないかと思った為。
|
177
177
|
https://cloudsmith.co.jp/blog/2022/02/2030266.html
|
178
178
|
|
179
|
+
### ○○様のご回答のもとをにして、修正した結果。
|
179
180
|
|
181
|
+
修正方法
|
182
|
+
・nginx.confを※1のURLを修正
|
183
|
+
・healthのcheck pathを/nginxに修正
|
184
|
+
・nginxをsudo nginx -s reloadで再起動
|
180
185
|
|
186
|
+
※1のURLを参考にnginx.confを修正させていただきました。
|
187
|
+
※1https://qiita.com/oogaki_newmedia/items/749c855ad985c8258e66
|
188
|
+
|
189
|
+
そしてhealth PathのURLを
|
190
|
+
/nginxに変更しました。
|
191
|
+
|
192
|
+
しかし404が解消されていないようです。
|
193
|
+
index.htmlは/usr/share/nginx/html/index.htmlに配置しております。
|
194
|
+
|
195
|
+
修正後のaccess.log
|
196
|
+
```
|
197
|
+
172.16.23.100 - - [22/Feb/2023:16:57:12 +0000] "GET /nginx HTTP/1.1" 404 153 "-" "ELB-HealthChecker/2.0" "-"
|
198
|
+
172.16.24.168 - - [22/Feb/2023:16:57:42 +0000] "GET /nginx HTTP/1.1" 404 153 "-" "ELB-HealthChecker/2.0" "-"
|
199
|
+
172.16.23.100 - - [22/Feb/2023:16:57:42 +0000] "GET /nginx HTTP/1.1" 404 153 "-" "ELB-HealthChecker/2.0" "-"
|
200
|
+
```
|
201
|
+
|
202
|
+
修正後のnginx.conf
|
203
|
+
```
|
204
|
+
1 # For more information /var/www/src/publicon configuration, see:
|
205
|
+
2 # * Official English Documentation: http://nginx.org/en/docs/
|
206
|
+
3 # * Official Russian Documentation: http://nginx.org/ru/docs/
|
207
|
+
4
|
208
|
+
5 user nginx;
|
209
|
+
6 worker_processes auto;
|
210
|
+
7 error_log /var/log/nginx/error.log;
|
211
|
+
8 pid /run/nginx.pid;
|
212
|
+
9
|
213
|
+
10 # Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
|
214
|
+
11 include /usr/share/nginx/modules/*.conf;
|
215
|
+
12
|
216
|
+
13 events {
|
217
|
+
14 worker_connections 1024;
|
218
|
+
15 }
|
219
|
+
16
|
220
|
+
17 http {
|
221
|
+
18 log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
222
|
+
19 '$status $body_bytes_sent "$http_referer" '
|
223
|
+
20 '"$http_user_agent" "$http_x_forwarded_for"';
|
224
|
+
21
|
225
|
+
22 access_log /var/log/nginx/access.log main;
|
226
|
+
23
|
227
|
+
24 sendfile on;
|
228
|
+
25 tcp_nopush on;
|
229
|
+
26 tcp_nodelay on;
|
230
|
+
27 keepalive_timeout 65;
|
231
|
+
28 types_hash_max_size 4096;
|
232
|
+
29
|
233
|
+
30 include /etc/nginx/mime.types;
|
234
|
+
31 default_type application/octet-stream;
|
235
|
+
32
|
236
|
+
33 # Load modular configuration files from the /etc/nginx/conf.d directory.
|
237
|
+
34 # See http://nginx.org/en/docs/ngx_core_module.html#include
|
238
|
+
35 # for more information.
|
239
|
+
36 include /etc/nginx/conf.d/*.conf;
|
240
|
+
37
|
241
|
+
38 server {
|
242
|
+
39 listen 80;
|
243
|
+
40 listen [::]:80;
|
244
|
+
41 server_name _;
|
245
|
+
42 root /var/www/src/public/;
|
246
|
+
43
|
247
|
+
44 add_header X-Frame-Options "SAMEORIGIN";
|
248
|
+
45 add_header X-XSS-Protection "1; mode=block";
|
249
|
+
46 add_header X-Content-Type-Options "nosniff";
|
250
|
+
47
|
251
|
+
48 index index.php index.html;
|
252
|
+
49
|
253
|
+
50 charset utf-8;
|
254
|
+
51
|
255
|
+
52 location / {
|
256
|
+
53 root /var/www/src/public/;
|
257
|
+
54 try_files $uri $uri/ /index.php?$query_string;
|
258
|
+
55 }
|
259
|
+
56
|
260
|
+
57 location /nginx {
|
261
|
+
58 root /usr/share/;
|
262
|
+
59 try_files $uri $uri/ /nginx/html/index.html;
|
263
|
+
60 }
|
264
|
+
61
|
265
|
+
62 location ~ \.php$ {
|
266
|
+
63 fastcgi_pass unix:/run/php-fpm/www.sock;
|
267
|
+
64 fastcgi_index index.php;
|
268
|
+
65 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
269
|
+
66 include fastcgi_params;
|
270
|
+
67 }
|
271
|
+
68 # Load configuration files for the default server block.
|
272
|
+
69 include /etc/nginx/default.d/*.conf;
|
273
|
+
70 }
|
274
|
+
71
|
275
|
+
72 }
|
276
|
+
```
|
277
|
+
|
278
|
+
また、Laravelのエラーログは表示されていませんでした。
|
279
|
+
一番最新のログです。
|
280
|
+
```
|
281
|
+
[2023-02-10 23:56:10] production.ERROR: Call to undefined function Termwind\ValueObjects\mb_strimwidth() {"exception":"[object] (Error(code: 0): Call to undefined function Termwind\\ValueObjects\\mb_strimwidth() at /var/www/src/vendor/nunomaduro/termwind/src/ValueObjects/Styles.php:1043)
|
282
|
+
```
|
283
|
+
|
284
|
+
|
181
285
|
### 最後に
|
182
286
|
足りていない情報などがありましたら、コメントしていただければ、早めに添付させていただきたいと思います。
|
183
287
|
また、言葉として足りない箇所やわかりにくい箇所がありましたら、コメントいただければ、修正したいと思います。
|
2
エラーlogについて記載を追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -149,8 +149,9 @@
|
|
149
149
|
172.16.24.58 - - [21/Feb/2023:14:14:51 +0000] "GET / HTTP/1.1" 404 153 "-" "ELB-HealthChecker/2.0" "-"
|
150
150
|
172.16.23.109 - - [21/Feb/2023:14:14:51 +0000] "GET / HTTP/1.1" 404 153 "-" "ELB-HealthChecker/2.0" "-"
|
151
151
|
```
|
152
|
+
※アクセスログをみて、アクセスが飛んできていることは確認できているのですが、
|
153
|
+
/var/log/nginx/error.log にはエラーが一切記載されておりません。
|
152
154
|
|
153
|
-
|
154
155
|
### 試したこと
|
155
156
|
nginx.confを書き換え以下のように書換え→404エラーのまま
|
156
157
|
```nginx.conf
|
1
タグを追加
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|