VirtualHost on WAMPSERVER not working
- by Martin C
I currently have WAMPSERVER 2.2 set up on my PC.
I'm trying to set up a new host called pplocal.local
I made the changes in httpd.conf to uncomment this:
Include conf/extra/httpd-vhosts.conf
Then, I edited httpd-vhosts.cong and I added the following:
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
DocumentRoot "E:/wamp2/www/"
ServerName localhost
</VirtualHost>
<VirtualHost 127.0.0.1>
DocumentRoot "E:/wamp2/www/pp/"
ServerName pplocal.local
<Directory "E:/wamp2/www/pp/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
CustomLog "E:\wamp2\logs\pplocal-access.log" common
ErrorLog "E:\wamp2\logs\pplocal-error.log"
Im my windows 'hosts' file I added:
127.0.0.1 localhost
127.0.0.1 pplocal.local
Then, I restarted apache.
If I type localhost in my browser I get the files at E:/wamp2/www/
If I type pplocal.local in my browser I get the files at E:/wam2/www/ instead of those at E:/wamp2/www/pp/
I have followed several tutorials and can't see what I'm doing wrong. I'm new to editing the files associated with apache so any advice is appreciated.
Thanks