WAMP server not running after enabling httpd-vhosts.conf

httpd.conf, wamp, wampserver

Solution

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

- Go to start menu

- type "cmd"

- press enter

- 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.

Problem

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,

Original source