[英]How to access web site hosted in Windows EC2 instance, hosted in a Private Subnet?
I have a windows EC2 instance hosted in a Private Subnet.我有一个托管在私有子网中的 Windows EC2 实例。
This private subnet has a NAT Gateway.这个私有子网有一个 NAT 网关。
My need is to access the web site hosted on this EC2 instance, from the internet.我需要从 Internet 访问托管在此 EC2 实例上的网站。
Following are the options that I tried but failed.以下是我尝试过但失败的选项。
Created an internet facing NLB -> Created listener -> connected lister to a Target Group, that has the EC2 instance registered.创建一个面向互联网的 NLB -> 创建侦听器 -> 将列表连接到目标组,该组已注册 EC2 实例。
Tried with Created Classic load balancer.尝试使用创建的经典负载均衡器。
The security group of the EC2 Instance has the following settings EC2 Instance 的安全组有以下设置
Source for HTTP and HTTPs is 0.0.0.0/0 source for RDP is 0.0.0.0/0 HTTP 和 HTTPs 的来源是 0.0.0.0/0 RDP 的来源是 0.0.0.0/0
Could anyone help me understand the right approach?谁能帮助我理解正确的方法?
What are you using for your internal routing?你的内部路由使用什么? Having the loadbalancer tied to the EC2 will allow you to get to the EC2 machine but the service you are running within it usually requires an overlay network that routes the incoming traffic to your service at the respective port.
将负载均衡器绑定到 EC2 将允许您访问 EC2 机器,但您在其中运行的服务通常需要一个覆盖网络,将传入流量路由到您在相应端口的服务。
If you have not set this up, I would recommend looking at either traefik
or nginx
.如果您还没有设置它,我建议您查看
traefik
或nginx
。
Hope this helps希望这可以帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.