I'm trying to set up two virtual hosts. Here's my httpd config:
<Directory /Users/userX/dev/sandbox-2> Order deny,allow deny from All Allow from localhost </Directory> NameVirtualHost 127.0.0.1 <VirtualHost 127.0.0.1> DocumentRoot "/Users/userX/dev/sandbox-2" ServerName blah </VirtualHost> <VirtualHost 127.0.0.1> DocumentRoot "/Users/userX/dev/sandbox" ServerName fooboar </VirtualHost>
My problem is that, no matter which server name I try to access in my browser (blah or foobar) it'll serve from blah's DocumentRoot. However, if I were to comment out the the VirtualHost for blah, then it'll take me to foobar's DocumentRoot.