On a shared server, we have some sites that only run on port 80. However, there are other sites that run on both port 80 and 443.
For example:
<VirtualHost *:80>
ServerName unsecure.com
</VirtualHost>
<VirtualHost *:80>
ServerName secure.com
RedirectPermanent / https://secure.com
</VirtualHost>
<VirtualHost *:443>
ServerName secure.com
</VirtualHost>
Requests to https://unsecure.com will be presented the certificate for secure.com. Is there any way to avoid this other than separating out the interfaces (i.e. foo:80 and bar:443 which isn't possible in this situation). Many of these sites on port 80 are legacy sites, and setting them up to use SSL isn't as straightforward as we had hoped.