I am attempting to set up a local WAMP server and I am running into a problem with mapping domains to directories. When I just do one directory it works fine, but once I add another it doesn't work. This is what I have in my vhosts file.
NameVirtualHost *:80 <Directory "D:\server "> Order Deny,Allow Allow from all </Directory> # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for all requests that do not # match a ServerName or ServerAlias in any <VirtualHost> block. # NameVirtualHost 127.0.0.1 <VirtualHost 127.0.0.1> DocumentRoot "d:\server\ctlife" ServerName site1.local </VirtualHost> <VirtualHost 127.0.0.1> DocumentRoot "d:\server\phpmyadmin" ServerName site2.local </VirtualHost>
And then in my hosts file I have put in this
127.0.0.1 site1.local 127.0.0.1 site2.local
If i take out site2.local in both files everything works fine, but doesn't seem to recognize the other one. I have followed a bunch of tutes on this and can't figure out what I am doing wrong.