This post on a different forum best describes my problem.
google is indexing my https:// sites as the wrong site. I need to stop https on other sites on the same IP going to the secure site.
I already put
if(!in_array($_SERVER["SERVER_NAME"], array("192.168.1.99", "www.domain1.com","domain1.com","secure.domain1.com")))
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
echo "<h1>404 Not Found</h1>";
at the top of the secure site which should 404 redirect any other domain for the time being. But how do i do this with apache. I have 5 IPs set up on the server i can use. But not sure how to configure. Or is there another way. Or can i do something clever with mod_rewrite