Configuring virtual domain, Apache is not happy about

  apache, virtualhost, windows

I am installing wordpress on ampps.
Created a local domain wordpress.localhost, added it to the hosts file wordpress.localhost

This is my httpd-vhosts.conf

<Directory "C:/Program Files/Ampps/www/wordpress.localhost">
Options FollowSymLinks Indexes
AllowOverride All
# Apache 2.2
<IfModule !mod_authz_core.c>
    Order deny,allow
    allow from All
# Apache 2.4
<IfModule mod_authz_core.c>
    Require all granted
ServerName wordpress.localhost
ServerAlias wordpress.localhost
ScriptAlias /cgi-bin/ "C:/Program Files/Ampps/www/wordpress.localhost/cgi-bin/"
DocumentRoot "C:/Program Files/Ampps/www/wordpress.localhost"
ErrorLog "C:/Program Files/Ampps/apache/logs/wordpress.localhost.err"
CustomLog "C:/Program Files/Ampps/apache/logs/wordpress.localhost.log" combined

The problem is when I type in wordpress.localhost in the browser, Apache resolves it to www root, not to the wordpress.localhost .
When I replaced <VirtualHost> with <VirtualHost *:80> in the httpd-vhosts file it magically started working.
I ran "ping -4 wordpress.localhost" and it was perfectly resolved to
Any idea what’s wrong and why Apache is not happy about the ?

Source: Windows Questions