Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WAMP server not running after enabling httpd-vhosts.conf

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,

like image 301
seemvision Avatar asked Apr 20 '12 14:04

seemvision


1 Answers

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.

like image 133
pim Avatar answered Oct 26 '22 01:10

pim