AWS ALB redirect to https

前端 未结 2 925
逝去的感伤
逝去的感伤 2021-02-19 16:50

My Apache servers are behind an ALB/ELB. I\'m terminating SSL at the load balancer. The load balancer listens on both 80 and 443. I want to redirect all http requests to http

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-19 17:28

    Application Load Balancer now supports two new actions: redirect and fixed-response. You can configure these actions as part of the content-based routing rules, enabling you to offload this functionality to the load balancer. This simplifies deployments while benefiting from the scale, the availability, and the reliability of Elastic Load Balancing.

    Here's what I did to make it work on AWS:

    Example configuration for ALB redirection - HTTP -> HTTPS

    https://aws.amazon.com/about-aws/whats-new/2018/07/elastic-load-balancing-announces-support-for-redirects-and-fixed-responses-for-application-load-balancer/

提交回复
热议问题