title: ServerAlias on OSX Mountain Lion webserver not resolving
body: <p>I have a problem with ServerAliases not resolving to the corresponding server.</p>
  
  <p>My hosts file is set up as such (this is part of trying to set up APE so please excuse the extraneous code):</p>
  
  <pre><code>127.0.0.1   localhost
  255.255.255.255 broadcasthost
  ::1             localhost 
  fe80::1%lo0 localhost
  
  127.0.0.1 testy.local
  127.0.0.1 testsite.local
  127.0.0.1 ape-test.local
  127.0.0.1 chickens.cluck.com
  127.0.0.1 ape.ape-test.local
  127.0.0.1 ape2.ape-test.local
  </code></pre>
  
  <p>And the httpd-vhosts.conf:</p>
  
  <pre><code>NameVirtualHost *:80
  
  &lt;VirtualHost *:80&gt;
          ServerName ape-test.local
          ServerAlias ape.ape-test.local
          ServerAlias test.ape-test.local
          ServerAlias *.ape.ape-test.local
  
          DocumentRoot "/Library/WebServer/Documents/"
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost *:80&gt;
      ServerName testy.local
      ServerAlias testy
      ServerAlias fish.local
      DocumentRoot "/Users/myusername/Sites/testsite"
      &lt;Directory /Users/myusername/Sites/testsite/&gt;
          Order allow,deny
          Allow from all
      &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>Virtual hosts have been enabled in httpd.conf, and testy.local resolves to the correct directory. But using 'testy/' or 'fish.local' will not resolve.</p>
  
  <p>There appears to be nothing written to the error log or console either, and running <code>sudo bash -x /usr/sbin/apachectl -k start</code> reveals no errors.
  Running <code>httpd -S</code> reveals no problems either:</p>
  
  <pre><code>VirtualHost configuration:
  wildcard NameVirtualHosts and _default_ servers:
  *:80                   is a NameVirtualHost
           default server ape-test.local (/private/etc/apache2/extra/httpd-vhosts.conf:44)
           port 80 namevhost ape-test.local (/private/etc/apache2/extra/httpd-vhosts.conf:44)
           port 80 namevhost testy.local (/private/etc/apache2/extra/httpd-vhosts.conf:53)
  Syntax OK
  </code></pre>
  
  <p>So it appears as just the ServerAlias isn't working.</p>
  
  <p>Does anybody have any ideas?</p>