We have a Virtualmin setup with a number of different sites on the same webserver and IP address. This works great for the http side of things but recently one of the users has asked us to set up an HTTPS address as well. I got that working through the UI and it works well for that particular domain but we have noticed that if we access another domain with HTTPS rather than HTTP we are getting sent to the site with SSL set up.
For example, the site we have changed to be HTTPS is called SSLsite.co.uk and another site is called HTTPsite.com. If we go to http://www.HTTPsite.com that works great and if we go to https://www.SSLsite.co.uk or http://www.SSLsite.co.uk that works as well. However if we go to https://www.HTTPsite.com we get an invalid certificate prompt (for www.SSLsite.co.uk) and end up on https://www.SSLsite.co.uk.
I understand why it is probably working as they are all sitting on the same IP address but is there any way of telling the system to fail (404) if somebody tries to go to https://www.HTTPsite.com rather than serve https://www.SSLsite.co.uk? I understand from something else I read that if there were two sites both running https it should be able to differentiate between them on the same IP in a similar way to host headers on http but what about if one of them doesn't have an SSL site as per my example? Is the only way around it to put them on separate IP addresses?
Many thanks in advance