I\'m trying to create a fallback for my virtual hosts. My configuration looks like this:
# Fetch all pre-defined hosts
I use them :) You forgot about switching off canonical names - unfortunately I don't know why there must be ServerAlias in my configuration - it just won't work without it - code below is tested and working
<Directory "C:/LocalServer/*/public">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
Require local
</Directory>
<VirtualHost *:80>
# Apache will form URLs using the hostname supplied by the client
UseCanonicalName Off
# available aliases to use
ServerAlias *.lab *.lab2
# where to put them
VirtualDocumentRoot "C:/LocalServer/%2/%1/public/"
</VirtualHost>
Given that you are obviously using windows for development, but (presumably) deploying to linux for production, have you thought about using a virtual machine for development?
I've written a guide for setting up here: http://otaqui.com/blog/1652/setting-up-a-virtualbox-virtual-machine-for-web-development-with-multiple-sites-using-mod_vhost_alias-and-virtualdocumentroot/ but in essence:
Setting up new projects is then as simple as creating a new directory on your host, and the virtual machine guest uses that. If you are deploying to linux, you might save yourself all sorts of headaches (filename case-sensitivity being only one).