AWS ALB Http 到 Https 重定向 - 如何将重定向的不安全连接转换为安全连接?
AWS ALB Http to Https redirection - How to convert redirected insecure connection to a secure connection?
ALB 附加了 2 个侦听器,https 和 http 被重定向到具有相同主机、路径和查询的 https(端口 443),如下所示。路由 53 别名记录将 sales.company.com 转发到此 ALB。
LBListener:
Type: AWS::ElasticLoadBalancingV2::Listener
Properties:
DefaultActions:
-
Type: 'redirect'
RedirectConfig:
Protocol: 'HTTPS'
Port: 443
Host: '#{host}'
Path: '/#{path}'
Query: '#{query}'
StatusCode: 'HTTP_301'
LoadBalancerArn: 'LBArn'
Port: 80
Protocol: 'HTTP'
Https 侦听器附加了为 sales.company.com 创建的 ssl 证书。
当我访问 https://sales.company.com through browser then I see the connection is secure and everything works fine. But when I access it with http://sales.company.com 时连接不安全,为什么?如何确保安全?
已更新 - 添加了 ALB 的屏幕截图 添加了屏幕截图
我已经重新创建了我的整个基础架构堆栈,它为我解决了问题,并且没有对问题中提到的配置进行任何更改,因此我将其标记为已解决。
ALB 附加了 2 个侦听器,https 和 http 被重定向到具有相同主机、路径和查询的 https(端口 443),如下所示。路由 53 别名记录将 sales.company.com 转发到此 ALB。
LBListener:
Type: AWS::ElasticLoadBalancingV2::Listener
Properties:
DefaultActions:
-
Type: 'redirect'
RedirectConfig:
Protocol: 'HTTPS'
Port: 443
Host: '#{host}'
Path: '/#{path}'
Query: '#{query}'
StatusCode: 'HTTP_301'
LoadBalancerArn: 'LBArn'
Port: 80
Protocol: 'HTTP'
Https 侦听器附加了为 sales.company.com 创建的 ssl 证书。
当我访问 https://sales.company.com through browser then I see the connection is secure and everything works fine. But when I access it with http://sales.company.com 时连接不安全,为什么?如何确保安全?
已更新 - 添加了 ALB 的屏幕截图 添加了屏幕截图
我已经重新创建了我的整个基础架构堆栈,它为我解决了问题,并且没有对问题中提到的配置进行任何更改,因此我将其标记为已解决。