Search code examples
amazon-web-servicesamazon-elastic-beanstalkamazon-elb

Load Balancer unable to redirect from HTTP to HTTPS in Elastic Beanstalk


To achieve HTTPS on my domain name Which is connected to my newly created Elastic Beanstalk Application. I have configured my EB Environment as follows:-

  1. My server is set to Apache.

2.Modified my capacity:-

enter image description here

3.Added a listener to my classic load balancer(Rest settings are kept default):-

enter image description here

4.Here's how I've configured my Route53:-

enter image description here

  1. Here's my Namecheap config:-

enter image description here

I still can not achieve http to https. please help. Do ask for more information if needed.


Solution

  • This is because CLB doesn't support redirection. From AWS:

    Classic Load Balancers can't redirect HTTP traffic to HTTPS.

    The easiest way to rectify the issue would be to change CLB into ALB, and then setup the redirection by following any of the AWS guides, e.g.: