WAMP server not running after enabling httpd-vhosts.conf

seemvision picture seemvision · Apr 20, 2012 · Viewed 26.8k times · Source

I tried enabling Virtual Host on my WAMP installation, but WAMP server will not run if I enable http-vhosts.conf, and the icon remains orange.

Here is my hosts file:

127.0.0.1       localhost
127.0.0.1       test.localhost

My httpd.conf:

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

and my httpd-vhosts.conf:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot "c:/wamp/www"
    ServerName localhost
    ErrorLog "logs/localhost-error.log"
    CustomLog "logs/localhost-access.log" common
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot "c:/wamp/www/test"
    ServerName test.localhost
</VirtualHost>

It works fine if I add the VirtualHosts to my httpd.conf, but I noticed that the Apache server will not run if I comment out "Include conf/extra/httpd-vhosts.conf". What is causing this issue?

Thanks,

Answer

pim picture pim · Oct 12, 2013

To determine the exact line on which the error is occurring, take the following steps:

  1. Go to start menu
  2. type "cmd"
  3. press enter
  4. paste the following C:\wamp\bin\apache\apache2.2.22\bin\httpd.exe

Note: You may need to tweak the apache2.2.22 portion of the path according your local version of Apache.