Mountain Lion OSX Server One IP Virtual Sites www resolving to wrong Site
here is what I did that messed things up.

I set domain1 as the hostname, when I should have been using an alias like server.domain1.com. Also, i had the static ip selected in both domains. So, I changed the hostname to server.domain1 and then changed both domains to listen on any port.