简体   繁体   English

无法从外部访问托管在Amazon EC2实例上的网站

[英]Website hosted on Amazon EC2 instance not accessible from outside

I have a running(Windows OS) Amazon EC2 instance. 我有一个正在运行的(Windows OS)Amazon EC2实例。 Just to check whether, I can host a website and access it from outside, I created a index.html file with the message 'Hello World!!', and hosted it using http-server on port 80. I can access this website using localhost. 只是为了检查是否可以托管一个网站并从外部访问它,我创建了一个带有消息“ Hello World !!”的index.html文件,并使用端口80上的http-server托管了它。本地主机 However, I am not able to access the website from my personal laptop. 但是,我无法从我的个人笔记本电脑访问该网站。 I am using Public DNS to access the website, I have also tried with public ip. 我正在使用公共DNS访问该网站,我也尝试使用公共IP。

In security group, I have opened inbound traffic for HTTP & HTTPS both for all IPs. 在安全组中,我为所有IP打开了HTTP和HTTPS的入站流量。 I can ping this instance from my laptop using the public DNS. 我可以使用公用DNS从笔记本电脑ping此实例。 I am not sure, what else is missing ? 我不确定,还缺少什么?

I would open all traffic to all IPs, clear your DNS cache, and make 100% sure that your security group is assigned to the correct instance. 我将打开所有IP的所有流量,清除DNS缓存,并100%确保将安全组分配给正确的实例。

Once you get that to work, then reduce it back down to http/s only. 一旦使它起作用,然后将其降低到仅http / s。

If you are in a VPC, then then check your access control lists. 如果您在VPC中,请检查您的访问控制列表。 Is the subnet a public subnet? 子网是公共子网吗?

Check your Windows Firewall settings. 检查您的Windows防火墙设置。 This can be overlooked. 这可以忽略。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Amazon EC2实例ping但从外部无法访问django服务器 - Amazon EC2 instance pinging but django server is not accessible from outside 无法从Amazon EC2托管网站发送电子邮件 - Unable to send emails from Amazon EC2 hosted website 如何从亚马逊 EC2 实例下载网站文件和数据库? - How to download website files and db from an amazon EC2 instance? Amazon EC2 linux实例上托管的scrapyd实例的输入/输出 - input/output for scrapyd instance hosted on an Amazon EC2 linux instance Amazon EC2微实例 - 无法访问公共DNS - Amazon EC2 Micro Instance - Public DNS Not Accessible 如何配置防火墙以允许来自 Amazon EC2 托管网站的 REST 请求 - How to configure your firewall to allow REST requests from Amazon EC2 hosted website 无法远程连接到托管在亚马逊 ec2 实例上的 postgresql 数据库 - Cannot connect remotely to postgresql database hosted on amazon ec2 instance 如何使私有子网中的 EC2 实例可从 Internet 访问? (如能够访问该网站) - How to make EC2 instance in private subnet accessible from the internet? (as in being able to visit the website) 来自EC2实例的Amazon SQS区域 - Amazon SQS region from EC2 Instance 从AMI创建EC2 Amazon实例 - Creating EC2 Amazon instance from AMI
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM