EC2实例服务器不接受HTTPS请求 [英] EC2 instance server not accepting HTTPS requests

查看:76
本文介绍了EC2实例服务器不接受HTTPS请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个EC2实例,该实例可以在http上完美运行.但是,当我尝试将 http 替换为 https 时,我在浏览器上将此代码打印了出来.无法提供安全的连接.与该实例相关联的安全组被配置为允许来自 HTTP HTTPS 的请求,如附件中的图像所示:

I Created an EC2 instance that is running perfectly over http.but when i try to replace http to https i got this printed on the browser This site can’t provide a secure connection. the security group that is associated to this instance is configured to allow requests from both HTTP and HTTPS as in the attached image:

推荐答案

您正试图通过已为HTTP配置的端口运行https.

You are trying to run https over a port that has been configured for HTTP.

有多种解决方法:

  • 在您的本地计算机上设置代理服务器,例如Nginx.设置 certbot 来生成您的SSL,然后从您的代理服务器提供该服务.
  • 在服务器前面创建 ELB ,在ACM中生成证书并添加服务器作为ELB的目标(运行http).将负载平衡器用于SSL终止.
  • 在服务器前创建 CloudFront 分发,在ACM中生成证书并转发流量到服务器作为源(运行http).
  • Setup a proxy on your local server, such as Nginx. Setup certbot to generate your SSL and then serve this from your proxy.
  • Create an ELB in front of your server, generate a certificate in ACM and add your server as a target (running http) to the ELB. Use the load balancer for SSL termination.
  • Create a CloudFront distribution in front of your server, generate a certificate in ACM and forward traffic to your server as the origin (running http).

这篇关于EC2实例服务器不接受HTTPS请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆