インターネットブラウザから AWS Ubuntu インスタンスの NGINX ウェルカムページにアクセスするにはどうすればいいですか?

インターネットブラウザから AWS Ubuntu インスタンスの NGINX ウェルカムページにアクセスするにはどうすればいいですか?

Ubuntu 16.04の新しいインスタンスを作成しました。NGINXをインストールしたところ、次のようになりました。netstat -ntlp

root@ip-172-31-8-234:/home/ubuntu# netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      11856/nginx -g daem
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1328/sshd
tcp6       0      0 :::80                   :::*                    LISTEN      11856/nginx -g daem
tcp6       0      0 :::22                   :::*                    LISTEN      1328/sshd

curl localhost に問い合わせると、次の結果が返されます:

ubuntu@ip-172-31-8-234:~$ curl localhost
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

これは NGINX のウェルカム ページです。これで NGINX は完了したようです。

しかし、私はこのページをインターネットを通じて見ることができるようにしたいと思います。

これは私の AWS サービス ページにあるものです。

Public DNS (IPv4) - ec2-54-94-152-233.sa-east-1.compute.amazonaws.com
Instance state - running
IPv4 Public IP - 54.94.152.233

したがって、どのブラウザでも 54.94.152.233 と入力すれば、ウェルカム ページが表示されるはずです。

代わりに、次のエラー メッセージが表示されます。

This site can’t be reached

54.94.152.233 took too long to respond.

何が足りないのでしょうか?

答え1

私の記憶では、デフォルトのVPCとセキュリティグループの設定では、どのポートでも受信トラフィックは許可されません。ポート80で受信トラフィックを許可するように設定を変更すれば、問題はないはずです。

関連情報