I have domain "domain1.com" which uses ip "1.1.1.1" and is configured:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName domain1.com
.......
</VirtualHost>
<VirtualHost 1.1.1.1:443>
ServerAdmin webmaster@localhost
ServerName domain1.com
.......
</VirtualHost>
I tried to add new domain name which uses same IP, "domain2.com"
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName domain2.com
.......
</VirtualHost>
<VirtualHost 1.1.1.1:443>
ServerAdmin webmaster@localhost
ServerName domain2.com
.......
</VirtualHost>
But when i restart apache it says:
[warn] VirtualHost 1.1.1.1:443 overlaps with VirtualHost 1.1.1.1:443, the first has precedence, perhaps you need a NameVirtualHost directive
And when i tried to open any of them, 1st domain certificate showed as if there is no SSL, 2nd domain was okay.