how can I set a default VirtualHost in apache? Preferably, I want the default host not to be the same as the ip address host. Now I have something like this:
An alternative setting is to have the default virtual host at the end of the config file rather than the beginning. This way, all alternative virtual hosts will be checked before being matched by the default virtual host.
Example:
NameVirtualHost *:80
Listen 80
...
ServerName host1
DocumentRoot /someDir
ServerName host2
DocumentRoot /someOtherDir
DocumentRoot /defaultDir