I have an odd situation where I want to have the urls app1.example.com, example.com and *.example.com all using a different virtual host. This is what I have (excluding example.com cause it just makes it messier)
ServerName app1.example.com ServerAlias app1.example.com
DocumentRoot = /var/www/app1 # Other configuration for this app here
ServerName wildcard.example.com ServerAlias *.example.com
DocumentRoot = /var/www/wildcard # other configuration for this app here
The problem is that they conflict. Whichever one is listed first wins out. How can I host both a wildcard virtualhost and a specific one?
Note: I'm not just changing DocumentRoot in the config, so using mod_rewrite to change the DocumentRoot variable does not fix it.
Thanks