I'm setting up more than one virtual host on my OS X box.
I'm using the NameVirual Host set to the single IP that is statically assigned to the box.
I've created two VirtualHost directives, as such
<VirtualHost x.x.x.x> {where x.x.x.x is the static IP of the box}
ServerName www.domain1.com
{rest deleted for brevity}
</VirtualHost>
<VirtualHost x.x.x.x> {where x.x.x.x is the static IP of the box}
ServerName www.domain2.com
{rest deleted for brevity}
</VirtualHost>
This works fine...BUT:
If type the virtual host domains in a web browser WITHOUT prepending the www, it loads the first VirtualHost I've created, even for domain2.com
Furthermore, if I try to go to the "main" web site (machinename.company.com) it loads the first VirtualHost instead of the Apache welcome page (and link to get to the Apache manual) as it otherwise did before I started messing with the VirtualHost configs.
How do I correct this?
It's not a DNS issue, because I've put a blank record for each respective domain to satisfy clients trying to get to the sites without the www.
Steve