I have this in my sites-available apache2 virtual host file:
<VirtualHost *:80>
ServerName domain.com
ServerAlias www.domain.com
...
</VirtualHost>
Why does apache send requests from www.domain.com to the correct path, but domain.com gets sent to the default virtual host?
Update: The reason domain.com gets sent to the default virtual host is because the hostname of the machine automatically gets sent to default.