Apache VHost Configuration Precedence?

Apache searches for vhost matches from top to bottom and actions the firsh match that it encounters. If you renamed videoupload.conf to 0videoupload.conf it would be read before mysite.conf and it should just work.


I had a similar issue. The resolution was to remove the domain name from the headers of any other <VirtualHost> directive. Remove:

<VirtualHost test.blah.org:443>
ServerName test.blah.org

Replace with:

<VirtualHost *:443>
ServerName test.blah.org

Using a domain name in the header caused apache to match to that virtual host in preference to my ServerAlias static-*.blah.org under the <VirtualHost *:443> directive.