I have configured Vhost on apache2.it is a name based configuration. First domain is ssl-secure and second one is non ssl-secure site.All are working fine if hit in browser address bar https://www.domain1.com/page1/ and http://domain2.com/page2/ . but if i try to access https://domain2.com/page1/ and try to load with unsafe page1 is open while it not available on domain2.com.
if I check from ssl checker domain2 also get a same ssl certificate
My expectation is it should not load page1 because it is not exists.and also if check from ssl checker should not found ssl-certificate any more.How to prevent this please any one can guess. thanks in advance.
my configration is in available in folder "/etc/apache2/sites-available" example below domain1.com.conf
<VirtualHost *:80>
ServerName domain1.com
ServerAlias www.domain1.com
DocumentRoot /var/www/domain1.com/public_html
</VirtualHost>
<VirtualHost *:443>
ServerName domain1.com
ServerAlias *.domain1.com
DocumentRoot /var/www/domain1.com/public_html
SSLCertificateFile "path/domain1_com.crt"
SSLCertificateKeyFile "path/domain1_.key"
SSLCACertificateFile "path/domain1.ca-bundle"
</VirtualHost>
domain2.com.conf
<VirtualHost *:80>
ServerName domain2.com
ServerAlias *.domain2.com
DocumentRoot /var/www/domain2.com/public_html
</VirtualHost>