title: Apache Virtual Hosts Not Working As Expected
body: <p>My Apache <strong>"httpd-vhosts.conf"</strong> looks like this::</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      DocumentRoot "c:/wamp/www/"
      ServerName localhost
      ServerAlias *.localhost
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost laravel.dev:80&gt;
      DocumentRoot "c:/wamp/www/laravel/public"
      ServerName laravel.dev
      ServerAlias *.laravel.dev
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost learninglaravel.dev:80&gt;
      DocumentRoot "c:/wamp/www/learningLaravel/public"
      ServerName learningLaravel.dev
      ServerAlias *.learningLaravel.dev
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>and my <strong>"...system32/drivers/etc/hosts"</strong> also looks like this::</p>
  
  <pre><code>127.0.0.1       localhost
  127.0.0.1       localhost
  
  // I added the following entries. The first two entries above was already there
  127.0.0.1       laravel.dev
  127.0.0.1       learninglaravel.dev
  </code></pre>
  
  <p>When i enter <strong>"learningLaravel.dev"</strong> and <strong>"laravel.dev"</strong> into the browser, they work fine as expected. But i have other folders in my <strong>"www"</strong> folder that i use them to learn PHP and i want to be able to access the files in those folders directly from the browser like say <strong>"localhost/test/me.php"</strong>. But anytime i enter such address the browser goes to the second entry in the <strong>vhosts-conf</strong> file [which prints a laravel error meaning that it can't find the file]. It seems that the first entry in the <strong>vhosts-conf</strong> file is not working and Apache bypasses it to the second entry. The first entry is suppose to be the catch all entry. I tried to swap the second and third entries to see how it will behave but it always direct the browser to the second entry instead of the catch all (first entry) that is suppose to handle addresses likes <strong>"localhost/test/me.php"</strong></p>
  
  <p>Anytime i enter only <strong>"localhost"</strong> into the browser, it goes straight to the second entry instead of say printing the contents of the <strong>"www"</strong> folder.</p>
  
  <p>How do i solve this problem? thanks.</p>