Posted by:
radarsmit
(---.den.clearwire-wmx.net)
I've been trying to get virtual hosts to work for quite some time and I've followed many tutorials on how to do it and it just doesn't seem to be working..
My installation directory is the normal c:/wamp/ directory and [
localhost] worked just fine before I started doing the virtual host thing.
I opened up my hosts file in c:/windows/system32/drivers/etc/ folder and put these 2 lines at the beginning:
127.0.0.1 localhost
127.0.0.1 mylocalsite.loc
I've also tried just mylocalsite, and ive tried adding in www.mylocalsite.loc and www.mylocalsite in the hosts file. I put those at the beginning because spybot search and destroy likes to append stuff to the end of the file a lot.
I then uncommended the Include conf/extras line to include the vhosts.conf file for apache.
I created the folder mylocalsite inside c:/wamp/www/ and created the logs folder as well..
right now in my httpd-vosts.conf file all I have is:
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "C:/wamp/www/mylocalsite"
ServerName mylocalsite.loc
ErrorLog "C:/wamp/www/mylocalsite/logs/error.log"
CustomLog "C:/wamp/www/mylocalsite/logs/access.log" common
</VirtualHost>
Once I did that, I went and restarted all services associated with WAMP, and wait to see if the icon turns green -- which it does...
So i try and visit mylocalsite.loc and firefox automatically appends www. onto the domain, and it tells me there is a problem loading a page because there is no server at www.mylocalsite.loc (even when i configured it to be www.mylocalsite.loc)
and when i go to [
localhost] it brings me to the mylocalsite directory and the error logs show:
[Tue Sep 13 20:08:12 2011] [error] [client 127.0.0.1] client denied by server configuration: C:/httpd-2.2-x64, referer: [
localhost]
[Tue Sep 13 20:08:13 2011] [error] [client 127.0.0.1] client denied by server configuration: C:/httpd-2.2-x64, referer: [
localhost]
Now i notice that when I open up cmd and try to ping it, it tells me that the ping request could not find the host.
Any ideas?