I would like to provide a configuration file in .ebextension/
folder that would allow my EC2 Elastic Beanstalk instance to reply HTTPS.
I am using 64bit Amazon Linux 2017.03 v2.4.4 running PHP 7.0 Elastic Beanstalk.
How can I configure my server to enable HTTPS using configuration files?
Don't try to fight AWS best practices. To use HTTPS with Elastic Beanstalk configure the certificate in AWS Certificate Manager and assign it to Elastic Beanstalk's load balancer.
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https.html