单实例Elastic Beanstalk节点应用程序.HTTPS拒绝连接 [英] Single Instance Elastic Beanstalk Node App. HTTPS refused to connect

查看:57
本文介绍了单实例Elastic Beanstalk节点应用程序.HTTPS拒绝连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将node.js应用程序部署到Elastic Beanstalk.当我尝试通过HTTP访问页面时:一切正常.当我尝试通过HTTPS访问时:出现拒绝连接错误.我已按照

I have deployed a node.js app to Elastic Beanstalk. When I try to access the page via HTTP: everything works fine. when I try to access via HTTPS: I get a refused to connect error. I have followed the instructions on

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/https-singleinstance-nodejs.html

我创建了一个.ebextensions文件夹,而我的https-instance-single.config如下所示:

I created a .ebextensions folder and my https-instance-single.config looks like:

Resources:
  sslSecurityGroupIngress: 
    Type: AWS::EC2::SecurityGroupIngress
    Properties:
      GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]}
      IpProtocol: tcp
      ToPort: 443
      FromPort: 443
      CidrIp: 0.0.0.0/0

我已经上载并部署了包含相同内容的新zip文件.我可以通过HTTP访问,但不能通过HTTPS访问.

I have uploaded and deployed the new zip file with these included and still the same thing. I can access via HTTP but not via HTTPS.

任何帮助将不胜感激.

推荐答案

我建议您将LetsEncrypt用于Elastic Beanstalk单个实例.根据您当前的配置,它只有开放的端口443可以服务HTTPS,但是您没有指向证书.这是Elastic Beanstalk上的LetsEncrypt SSL的教程: https://www.tutcodex.com/ssl-on-single-instance-elastic-beanstalk-tutorial/

I would suggest you use LetsEncrypt for Elastic Beanstalk single instance. According to your current configuration, its only open port 443 to serve HTTPS but you are not pointing to certificate. This is the tutorial for LetsEncrypt SSL on Elastic Beanstalk: https://www.tutcodex.com/ssl-on-single-instance-elastic-beanstalk-tutorial/

这篇关于单实例Elastic Beanstalk节点应用程序.HTTPS拒绝连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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