For non https, no one issue, but trying to redirect HTTPS subdomain encounter difficulties.
I’ve a Letsencrypt certifcate, only for “https://www.example.com” and I would not to request a new one for the subdomain too.
I’ve create a new one Apache virtualhost:
<VirtualHost *:80> ServerName www.sub.example.com Redirect permanent / http://www.example.com </VirtualHost>
and this works fine, but adding on the same virtualhost the 443 directive it doesn’t work:
<VirtualHost *:443> ServerName www.sub.example.com Redirect permanent / http://www.example.com SSLEngine On </VirtualHost>
obtaining an SSL warning: “This site is insecure…”
How could I get around the obstacle?
Many many thanks!