title: One Apache virtual host resolves to index of/, while the others resolve correctly
body: <p>I'm having an issues trying to resolve a third virtual host. The third virtual host always resolves to index of/.</p>
  
  <p>Localhost and eshop.lh both correctly resolve their own individual index files.</p>
  
  <p><strong>UPDATE 1</strong> I've added another test vHost, this also does not resolve correctly and serves index of/. Removing eshop and localhost does not change this behaviour. </p>
  
  <p><strong>UPDATE 2</strong>
  Changed loglevel config to debug.</p>
  
  <p>The errors i'm getting is no matching ServerName but it seems to be looking in SSL 433 VHost configurations. The names and paths are correct, no typos.</p>
  
  <pre><code>[ssl:debug] [pid 14388:tid 1924] ssl_engine_kernel.c(2364): [client 127.0.0.1:54023] AH02044: No matching SSL virtual host for servername engine.lh found (using default/first virtual host)
  </code></pre>
  
  <p>It then defaults the connection to (server www.example.com:443) which is the first configures (default) SSL VHost in the httpd-ssl.conf file.</p>
  
  <p>As a test, i spoofed the ServerName for eshop.lh to see if it would also serve me the SSL Vhost default, but it doesn't. It serves me localhost which is the first Vhost configuration for port 80.</p>
  
  <p>Vhost configuration: Showing spoofed eshop.lh and including 433 config too, that i left out previously.</p>
  
  <pre><code>VirtualHost configuration:
  *:80                   is a NameVirtualHost
           default server localhost (C:/xampp/apache/conf/extra/httpd-vhosts.conf:46)
           port 80 namevhost localhost (C:/xampp/apache/conf/extra/httpd-vhosts.conf:46)
           port 80 namevhost engine.lh (C:/xampp/apache/conf/extra/httpd-vhosts.conf:53)
           port 80 namevhost test.lh (C:/xampp/apache/conf/extra/httpd-vhosts.conf:60)
           port 80 namevhost eshot.lh (C:/xampp/apache/conf/extra/httpd-vhosts.conf:67)
  *:443                  www.example.com (C:/xampp/apache/conf/extra/httpd-ssl.conf:121)
  </code></pre>
  
  <p><strong>UPDATE 3</strong>
  Re-installed xampp and it appears to be working smoothly now.</p>
  
  <p><strong>My configuration:</strong></p>
  
  <pre><code>NameVirtualHost *:80
  
  &lt;VirtualHost *:80&gt;
      DocumentRoot "C:/xampp/htdocs/localhost"
      ServerName localhost
      ErrorLog "logs/error.log"
      CustomLog "logs/access.log" common
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost *:80&gt;
      DocumentRoot "C:/xampp/htdocs/eshop.lh/"
      ServerName eshop.lh
      ErrorLog "logs/error.log"
      CustomLog "logs/access.log" common
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost *:80&gt;
      DocumentRoot "C:/xampp/htdocs/engine.lh/"
      ServerName engine.lh
      ErrorLog "logs/error.log"
      CustomLog "logs/access.log" common
  &lt;/VirtualHost&gt;
  
  
  127.0.0.1 localhost
  ::1 localhost
  127.0.0.1 eshop.lh
  127.0.0.1 engine.lh
  </code></pre>
  
  <p>The paths are correct on my machine.</p>
  
  <p>It's engine.lh that won't resolve correctly. eshop.lh works fine.</p>
  
  <p>The file inside the engine.lh directory are simply:</p>
  
  <p>read.me
  index.html</p>
  
  <p>Calling httpd -t -D DUMP_VHOSTS produces:</p>
  
  <pre><code>*:80                   is a NameVirtualHost
           default server localhost (C:/xampp/apache/conf/extra/httpd-vhosts.conf:44)
           port 80 namevhost localhost (C:/xampp/apache/conf/extra/httpd-vhosts.conf:44)
           port 80 namevhost eshop.lh (C:/xampp/apache/conf/extra/httpd-vhosts.conf:52)
           port 80 namevhost engine.lh (C:/xampp/apache/conf/extra/httpd-vhosts.conf:60) 
  </code></pre>
  
  <p>I restart apache with: hpptd -k restart or via the control panel. </p>
  
  <p>In the apache docs: Name-based Virtual Host support, it gives this example to serve up different vhosts:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      # This first-listed virtual host is also the default for *:80
      ServerName www.example.com
      ServerAlias example.com 
      DocumentRoot "/www/domain"
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost *:80&gt;
      ServerName other.example.com
      DocumentRoot "/www/otherdomain"
  &lt;/VirtualHost&gt;
  </code></pre>