How to redirect HTTP to HTTPS in Elastic Beanstalkby
I want to configure the web servers on my Elastic Beanstalk environment’s instances to redirect HTTP traffic to HTTPS.
I want to state what my beanstalk environment is:
- Apache Web Server.
- PHP 7.3
- HTTPS listener well configured with certificate
I will use a flexible way to configure my environment using .ebextensions
You can add AWS Elastic Beanstalk configuration files (.ebextensions) to your web application's source code to configure your environment and customize the AWS resources that it contains. Configuration files are YAML- or JSON-formatted documents with a .config file extension that you place in a folder named .ebextensions and deploy in your application source bundle.