【问题标题】:Elastic Load Balance Config for Node.js and AWS EBNode.js 和 AWS EB 的弹性负载平衡配置
【发布时间】:2016-05-20 08:26:03
【问题描述】:

我正在尝试将 Node.js Express 服务器部署到 AWS EB,但在配置代理时遇到了一些问题。

如果我在扩展文件夹下没有 elasticloadbalancing.config 文件,那么我可以通过 HTTP 和端口 3000 访问服务器。但是,如果我想添加一个配置以启用 HTTPS 并将侦听器端口 433 代理到实例端口3000,则网站无法加载。

这是我的配置文件,

option_settings:
  aws:elb:listener:443:
    ListenerProtocol: HTTPS:
    SSLCertificationeId: arn****
    InstancePort: 3000
    InstanceProtocol: HTTP

谁能给我一些建议?

我不确定 EB 是否配置正确,因为一旦我部署了配置文件,Web 层配置中负载平衡中的所有端口都已关闭。 EB 会自动使用负载平衡吗?

这是网络层配置,

这里有听众

谢谢。

【问题讨论】:

  • 我觉得配置没问题.. 你在 ELB 中看到了什么?你看到添加的监听器了吗?
  • 我在负载均衡器中看到了这两个监听器。 HTTP 80 HTTP 3000 HTTPS 443 HTTP 3000

标签: node.js amazon-web-services load-balancing amazon-elastic-beanstalk


【解决方案1】:

您需要指定配置以从 ELB 打开实例端口访问。

Resources:
  sslSecurityGroupIngress:
    Type: AWS::EC2::SecurityGroupIngress
    Properties:
      GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]}
      IpProtocol: tcp
      ToPort: 3000
      FromPort: 3000
      SourceSecurityGroupName: {"Fn::GetAtt" : ["AWSEBLoadBalancer" , "SourceSecurityGroup.GroupName"]}

请参阅此处提供的文档

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-elb.html

【讨论】:

    猜你喜欢
    • 2017-09-21
    • 2013-06-12
    • 2011-03-16
    • 2014-02-04
    • 1970-01-01
    • 2017-05-23
    • 2021-05-27
    • 1970-01-01
    • 2013-03-22
    相关资源
    最近更新 更多