小编Kyl*_*ley的帖子

使用 HTTPS 的 Elastic Beanstalk 应用程序上的 502 错误网关

我正在尝试使用 HTTPS 部署 Elastic Beanstalk 应用程序,但我不断从 HTTPS 端点收到 502 错误。我可以很好地访问 HTTP 端点,并且该网站似乎按预期工作。我只在 HTTPS 上看到此错误。我不太确定在哪里查找错误,但我没有在 EC2 实例的任何日志中看到任何看似相关的内容。这可能是我的 SSL 证书有问题吗?我目前正在使用自签名证书进行测试。以下是我用来创建资源的 CloudFormation 模板的相关部分:

Resources:

  # VPC and Subnets
  Vpc:
    Type: AWS::EC2::VPC
    Properties:
      CidrBlock: 10.0.0.0/16
      EnableDnsSupport: true
      EnableDnsHostnames: true
      InstanceTenancy: default
      Tags:
      - Key: Name
        Value: !Sub "ClimbAssistVpc${ResourceNameSuffix}"
  InternetGateway:
    Type: AWS::EC2::InternetGateway
  VpcGatewayAttachment:
    Type: AWS::EC2::VPCGatewayAttachment
    Properties:
      InternetGatewayId: !Ref InternetGateway
      VpcId: !Ref Vpc
  SubnetA:
    Type: AWS::EC2::Subnet
    Properties:
      AvailabilityZone: us-west-2a
      CidrBlock: 10.0.0.0/17
      MapPublicIpOnLaunch: true
      VpcId: !Ref Vpc
  SubnetB:
    Type: AWS::EC2::Subnet
    Properties:
      AvailabilityZone: us-west-2b
      CidrBlock: 10.0.128.0/18
      MapPublicIpOnLaunch: true …
Run Code Online (Sandbox Code Playgroud)

ssl https amazon-ec2 amazon-web-services amazon-elastic-beanstalk

2
推荐指数
1
解决办法
1766
查看次数