I'm attempting to redirect all requests to my main site to https://example.com with VirtualHost. I want to remove the www from the domain and force https.
Currently all http:// requests are redirecting properly, but https://www.example.com is throwing an SSL privacy error.
I have a couple subdomains I'm hosting as well, so I assume virtualhost is the way to go?
Wondering if there's anything I can do, or if I'll need to purchase a second SSL cert just to support the https://www. redirect.
Current vhost.conf:
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
Redirect permanent / https://example.com/
</VirtualHost>
<VirtualHost *:443>
ServerName example.com
DocumentRoot /var/www/html
SSLENGINE on
SSL certs...
</VirtualHost>