为一个IP地址托pipe的两个基于名称的网站之一禁用HTTPS

我有一个本地Apache2服务器,在一个IP上托pipe两个基于名字的网站。

第一个网站仅托pipe在端口80上。第二个网站托pipe在端口80和443上。如果在端口80上访问,用户将redirect到端口443。

one.local(仅限HTTP):

<VirtualHost *:80> ServerName one.local ServerAlias www.one.local DocumentRoot /var/www/html/one </VirtualHost> 

two.local(httphttps):

 <VirtualHost *:80> DocumentRoot /var/www/html/two ServerName two.local ServerAlias www.two.local Redirect permanent / https://two.local </VirtualHost> <VirtualHost *:443> DocumentRoot /var/www/html/two ServerName two.local ServerAlias www.two.local SSLEngine on SSLCertificateFile /etc/apache2/ssl/apache.pem SSLCertificateKeyFile /etc/apache2/ssl/apache.key </VirtualHost> 

这两个网站都可以访问,使用域名和two.local获得redirect就好了。

我遇到的问题是,当访问https://one.local ,用户已连接并提示Your connection is not secure因为尝试使用two.local的自签名证书。

我已经阅读了这个问题,似乎解决scheme是再次使用相同的证书,并从httpsredirect到http。

这个问题已经在三年前问过了,这个问题有没有更好的解决办法呢?