On 06/25/2012 07:36 PM, Peter Humphrey wrote: > > Good guess, but no cigar :-) > > I think (hope) I've found it: > http://en.gentoo-wiki.com/wiki/Apache2/Virtual_Hosts > makes it clear that a subdomain's definition must /precede/ the domain's > definition. I was doing it the other way around, it seeming obviously > logical to me: define the whole first, then refine the parts. I didn't even > consider the alternative. On the other hand this is vhost definition; is > the reasoning the same?
It is extraordinarily late here, but I don't think that remedy #2 makes sense. When you make a request to apache, you connect to an IP address (and port), and send a hostname; for example, "www.example.com". If any of the virtual hosts on that IP address (and port) answer to that hostname via "ServerName www.example.com" or "ServerAlias www.example.com", then that's the website you'll get. Otherwise, you get the default vhost on that IP/port. This will be whatever vhost was defined first on that IP/port (see unexpected result #1, but it works on IP/port combinations, not the entire machine). The fact that one hostname may be a subdomain of another should be irrelevant, but ask me again in the morning... In any case, your current configuration has to be pretty close to working -- you just need to figure out why "Options Includes" isn't kicking in.