无法通过浏览器访问 aws EC2 公共 IP

时间:2021-03-15 17:46:46

标签: amazon-web-services docker amazon-ec2

我在 EC2 中有一个 dockerized 应用程序,它运行良好

enter image description here

我有如下安全政策

enter image description here

这里是我的实例的详细信息

enter image description here

如果我点击 https://54.167.118.150/http://54.167.118.150/https://54.167.118.150:8080http://54.167.118.150:8080

显示连接被拒绝。

但是当我在浏览器中点击 IP 时,它说拒绝连接。

1 个答案:

答案 0 :(得分:0)

检查您的 Dockerfile 是否暴露了 8080 端口。 8080端口应该暴露给主机,在Dockerfile底部添加下面一行;

曝光 8080