title: Apache virtualHost ignored or pointing to the default one
body: <p>I'm trying to setup my Apache on OSX, but I'm not able to make my local url 'awr.local' point to the correct path. I mean whether I type <a href="http://localhost" rel="nofollow noreferrer">http://localhost</a> or <a href="http://awr.local" rel="nofollow noreferrer">http://awr.local</a>, it always shows me the index.html page in my 'localhost' vhost path.
  I've restarted my httpd service countless times, with or without sudo.</p>
  
  <p>Any help would be greatly appreciated, thanks :'|</p>
  
  <p>I've been following a tutorial (<a href="https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions" rel="nofollow noreferrer">https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions</a>), here are the steps about Apache :</p>
  
  <h1>Disabling the bundled Apache and installing the one from homebrew :</h1>
  
  <pre><code>sudo apachectl stop
  sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2&gt;/dev/null
  brew install httpd
  </code></pre>
  
  <h1>Then, some httpd.conf modifications :</h1>
  
  <pre><code># changed Listen 8080 to :
  Listen 80
  [...]
  # changed DocumentRoot "/usr/local/var/www" to :
  DocumentRoot "/Users/wallace/dev/default"
  [...]
  # changed &lt;Directory "/usr/local/var/www"&gt; to :
  &lt;Directory "/Users/wallace/dev/default"&gt;
  [...]
  # changed AllowOverride None to :
  AllowOverride All
  # uncommented :
  LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so
  [...]
  # changed
  # User _www
  # Group _www
  # to :
  User wallace
  Group staff
  [...]
  # added the missing line :
  ServerName localhost
  </code></pre>
  
  <p>Until this point everything seemed to be working fine, I've installed PHP and MariaDB without any problem.</p>
  
  <p>Then came the virtual hosts part :</p>
  
  <h1>Some other httpd.conf modifications :</h1>
  
  <pre><code># uncommenting these lines
  LoadModule vhost_alias_module lib/httpd/modules/mod_vhost_alias.so
  [...]
  Include /usr/local/etc/httpd/extra/httpd-vhosts.conf
  </code></pre>
  
  <h1>Editing the file /usr/local/etc/httpd/extra/httpd-vhosts.conf :</h1>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      DocumentRoot "/Users/wallace/dev/default"
      ServerName localhost
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost *:80&gt;
      DocumentRoot "/Users/wallace/dev/awr"
      ServerName awr.local
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <h1>The /etc/hosts file :</h1>
  
  <pre><code>127.0.0.1       localhost
  255.255.255.255 broadcasthost
  ::1             localhost
  127.0.0.1       awr.local
  ::1             awr.local
  </code></pre>
  
  <h1>The output of 'httpd -S' :</h1>
  
  <pre><code>VirtualHost configuration:
  *:80                   is a NameVirtualHost
           default server localhost (/usr/local/etc/httpd/extra/httpd-vhosts.conf:25)
           port 80 namevhost localhost (/usr/local/etc/httpd/extra/httpd-vhosts.conf:25)
           port 80 namevhost awr.local (/usr/local/etc/httpd/extra/httpd-vhosts.conf:30)
  ServerRoot: "/usr/local/opt/httpd"
  Main DocumentRoot: "/Users/wallace/dev/default"
  Main ErrorLog: "/usr/local/var/log/httpd/error_log"
  Mutex rewrite-map: using_defaults
  Mutex default: dir="/usr/local/var/run/httpd/" mechanism=default
  Mutex mpm-accept: using_defaults
  PidFile: "/usr/local/var/run/httpd/httpd.pid"
  Define: DUMP_VHOSTS
  Define: DUMP_RUN_CFG
  User: name="wallace" id=501 not_used
  Group: name="staff" id=20 not_used
  </code></pre>