I have a site example.com and setup a VirtualHost to redirect to https://www.example.com
When I go to http://example.com it works great, however https does not
How can I update my VirtualHost configuration to also direct https traffic?
<VirtualHost *:80>
ServerName example.com
Redirect permanent "/" "https://www.example.com"
</VirtualHost>
<VirtualHost *:443>
ServerName example.com
Redirect permanent "/" "https://www.example.com"
</VirtualHost>
The top one works great and redirects as expected, but https://example.com does not
Confirmed in AWS that the instance allows all traffic on both ports 80 and 443
--update
This is hosted on an AWS EC2 instance, and the HTTPS certificate in question was issued via the AWS Certificate Manager. Per Shim's suggestion I looked at https://wiki.apache.org/httpd/NameBasedSSLVHosts but it requires me to export a certificate which AWS does not permit? Is there another way around this?