For the people out there That are haveing problems with Virtual host and want to host multiple domain names follow theses instuctions:
I only tried this with Windows XP home and it worked for me good.
Ok first in the httpd.conf file go to the bottom of the page and Where you will see this
# Use name-based virtual hosting.
#
#NameVirtualHost *
#
#VirtualHost example:
#Almost any Apache directive may go into a VirtualHost container
#The first VirtualHost section is used for requests without a known
# server name.
1)Ok know that you see it you will have to take away the (#) from NameVirtualHost *
2) add :80 to NameVirtualHost * (so now it should like this ) NameVirtualHost *:80
3) In the bottom of the example that they give you, type:
<VirtualHost *:80>
ServerName localhost
DocumentRoot G:\apachefriends\xampp\htdocs
</VirtualHost>
(Make sure that you delete the (#) sign starting from
<VirtualHost *:80> to </VirtualHost>
4) type:
<VirtualHost *:80>
ServerName www.yourdomainname.com
DocumentRoot G:\apachefriends\xampp\htdocs\sites
</VirtualHost>
(Also make sure that you delete the (#) from there also and that there is a space between the first Virtual host and the second virtual host.
So now you will have this:
NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost *:80>
ServerName localhost
DocumentRoot G:\apachefriends\xampp\htdocs
</VirtualHost>
<VirtualHost *:80>
ServerName www.yourdomainname.com
DocumentRoot G:\apachefriends\xampp\htdocs\sites
</VirtualHost>
#
5) this gets a little tricky but you will get it:
Now go to C:\WINDOWS\system32\drivers\etc and open the host file thats in there.
6) at the bottom of that file you will see:
127.0.0.1 localhost
(type in the bottom of that:
127.0.0.1 www.yourdomainname.com
So now it should look like this:
127.0.0.1 localhost
127.0.0.1 www.yourdomainname.com
Now save and close.
your done!
Remeber with www.yourdomainname.com put the domain name that you want to add as a second site and it should match the one that you put in the httpd.conf file and the line that you added in the host file. Also make sure that you make a new folder in your htdocs for your second domain name I ussually name it site2 and on...
Good luck!
any question just post