http://ec2-IPアドレス.ap-northeast-1.compute.amazonaws.com/にアクセスすると404 Not Foundと表示されます。
http://Ipアドレス/にアクセスするとWe're sorry, but something went wrong.と表示されます。
cat log/nginx.error.logは以下の通りです。
2020/04/26 14:31:09 [error] 14950#0: *3101 open() "/var/www/rails/Portfolio/html/404.html" failed (2: No such file or directory), client: 10.0.1.56, server: _, request: "GET / HTTP/1.1", host: "10.0.0.85" 2020/04/26 14:31:11 [error] 14950#0: *3102 "/var/www/rails/Portfolio/html/index.html" is not found (2: No such file or directory), client: 10.0.0.146, server: _, request: "GET / HTTP/1.1", host: "10.0.0.85" 2020/04/26 14:31:11 [error] 14950#0: *3102 open() "/var/www/rails/Portfolio/html/404.html" failed (2: No such file or directory), client: 10.0.0.146, server: _, request: "GET / HTTP/1.1", host: "10.0.0.85" 2020/04/26 14:31:18 [error] 14950#0: *3103 "/var/www/rails/Portfolio/html/index.html" is not found (2: No such file or directory), client: 10.0.1.195, server: _, request: "GET / HTTP/1.1", host: "10.0.0.85" 2020/04/26 14:31:18 [error] 14950#0: *3103 open() "/var/www/rails/Portfolio/html/404.html" failed (2: No such file or directory), client: 10.0.1.195, server: _, request: "GET / HTTP/1.1", host: "10.0.0.85" 2020/04/26 14:31:19 [error] 14950#0: *3104 "/var/www/rails/Portfolio/html/index.html" is not found (2: No such file or directory), client: 10.0.1.56, server: _, request: "GET / HTTP/1.1", host: "10.0.0.85" 2020/04/26 14:31:19 [error] 14950#0: *3104 open() "/var/www/rails/Portfolio/html/404.html" failed (2: No such file or directory), client: 10.0.1.56, server: _, request: "GET / HTTP/1.1", host: "10.0.0.85" 2020/04/26 14:31:21 [error] 14950#0: *3105 "/var/www/rails/Portfolio/html/index.html" is not found (2: No such file or directory), client: 10.0.0.146, server: _, request: "GET / HTTP/1.1", host: "10.0.0.85" 2020/04/26 14:31:21 [error] 14950#0: *3105 open() "/var/www/rails/Portfolio/html/404.html" failed (2: No such file or directory), client: 10.0.0.146, server: _, request: "GET / HTTP/1.1", host: "10.0.0.85" 2020/04/26 14:31:29 [error] 14950#0: *3106 "/var/www/rails/Portfolio/html/index.html" is not found (2: No such file or directory), client: 10.0.1.56, server: _, request: "GET / HTTP/1.1", host: "10.0.0.85" 2020/04/26 14:31:29 [error] 14950#0: *3106 open() "/var/www/rails/Portfolio/html/404.html" failed (2: No such file or directory), client: 10.0.1.56, server: _, request: "GET / HTTP/1.1", host: "10.0.0.85" 2020/04/26 14:31:31 [error] 14950#0: *3107 "/var/www/rails/Portfolio/html/index.html" is not found (2: No such file or directory), client: 10.0.0.146, server: _, request: "GET / HTTP/1.1", host: "10.0.0.85" 2020/04/26 14:31:31 [error] 14950#0: *3107 open() "/var/www/rails/Portfolio/html/404.html" failed (2: No such file or directory), client: 10.0.0.146, server: _, request: "GET / HTTP/1.1", host: "10.0.0.85" 2020/04/26 14:31:36 [error] 14950#0: *3108 "/var/www/rails/Portfolio/html/index.html" is not found (2: No such file or directory), client: 10.0.0.101, server: _, request: "GET / HTTP/1.1", host: "10.0.0.85" 2020/04/26 14:31:36 [error] 14950#0: *3108 open() "/var/www/rails/Portfolio/html/404.html" failed (2: No such file or directory), client: 10.0.0.101, server: _, request: "GET / HTTP/1.1", host: "10.0.0.85" 2020/04/26 14:31:39 [error] 14950#0: *3109 "/var/www/rails/Portfolio/html/index.html" is not found (2: No such file or directory), client: 10.0.1.56, server: _, request: "GET / HTTP/1.1", host: "10.0.0.85" 2020/04/26 14:31:39 [error] 14950#0: *3109 open() "/var/www/rails/Portfolio/html/404.html" failed (2: No such file or directory), client: 10.0.1.56, server: _, request: "GET / HTTP/1.1", host: "10.0.0.85" 2020/04/26 14:31:41 [error] 14950#0: *3110 "/var/www/rails/Portfolio/html/index.html" is not found (2: No such file or directory), client: 10.0.0.146, server: _, request: "GET / HTTP/1.1", host: "10.0.0.85" 2020/04/26 14:31:41 [error] 14950#0: *3110 open() "/var/www/rails/Portfolio/html/404.html" failed (2: No such file or directory), client: 10.0.0.146, server: _, request: "GET / HTTP/1.1", host: "10.0.0.85
調べて見ましたが似たようなエラーに遭遇している人が見つかりませんでした。
/etc/nginx/conf.d/Portfolio.confは以下の通りです。
他、要望がありましたらファイルの中身を記載します。
上記のログから推測される原因のみでも良いので、どなたかアドバイスをください。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/04/27 05:55 編集
2020/04/28 02:25
2020/04/29 09:59