i use name-based virtual hosts to serve my different domains. however, when i began serving https, i had to get an extra ip so that i could serve two different domains via https.
so this is how i look at my apache setup (in this order--important for the default vhost):
000 vhost 208.75.85.33:80 www.wingedleopard.net, wingedleopard.net
001 vhost 208.75.85.33:443 www.wingedleopard.net
100 vhost 208.75.85.33:80 www.ttfproject.com, ttfproject.com
101 vhost 208.75.85.33:80 lucas.ttfproject.com
102 vhost 208.75.85.33:80 dannyp.ttfproject.com
103 vhost 208.75.85.33:80 dbrown.ttfproject.com
200 vhost 208.78.102.121:80 www.thinktankforums.com, thinktankforums.com
201 vhost 208.78.102.121:443 www.thinktankforums.com, thinktankforums.com
here's the problem: you can visit
https://www.ttfproject.com/ . this is because vhost 001 began listening on port 443 on ip 208.75.85.33 as the default vhost, which means it will answer to any name that isn't defined in another vhost.
but i don't want this service available! google is indexing both of these:
https://www.wingedleopard.net/lucas/journal/entry/198/
https://www.ttfproject.com/lucas/journal/entry/198/
i'm not real keen on that. i don't know how to solve this issue properly, so i'm thinking about just having a .htaccess or php script push a 4xx or 5xx http status code to the client if they visit 208.75.85.33:443 by means of a domain other than www.wingedleopard.net.
which code do you think i should use? or do you have a proper solution?
dup @
slicehost forum