You cannot specify a different ServerName and ServerAlias in the same VirtualHost.
Sure, that's the reason for ServerAlias: To can use any other hostname for this vhost too.
(Well, most time it's used to have
www.foo and foo for the same vhost. But technically,
www.foo and foo are completely different hostnames and can also live on different servers.)
The ServerName and ServerAlias should be the same more less.
A software (Apache) is not a human reader
For it, the difference between "www.foo" and "foo" or "foo" and "bar" is the same.
If you are using HOSTS file entries, the ServerAlias directive isn't necessary.
That's also wrong:
First a web browser must know the IP for a hostname, so it can connect to the web server. And it can know this from a dns server or a hosts file. If the browser connect to the server (with using the ip), it also send a header with the hostname it want to access.
For namebased vhosts:
And now the server compares this header value with the values from Servername/ServerAlias. If the server found a match, it delivers from this vhost. It the server don't find a match, it delivers from the first (default) vhost.
OK, back to topic, and that's the problem... the vhost.conf should work in the way the thread starter want.