share
Stack OverflowProblem in creating two Virtual Hosts
[+1] [0] user418232
[2011-03-24 14:02:52]
[ apache virtualhost ]
[ http://stackoverflow.com/questions/5420358] [DELETED]

HI i m trying to create virtual hosts for my PHP sites.I edited httpd-vhosts.conf with the following code

<VirtualHost *:80>  
 DocumentRoot C:/xampp/htdocs/logo
 ServerName localhost
 </VirtualHost>

<VirtualHost *:80>  
 DocumentRoot C:/xampp/htdocs/new
 ServerName local
 </VirtualHost>

and host file with

127.0.0.1       local
127.0.0.1       localhost

Now the logo project is accessible but the new is not.

If you could post your entire virtual host configs, then we might be able to help you more, but now I think there's not enough information. - Imi Borbas
Can you post the entire <VirtualHost> section for each virtual host? - Justin Dearing
He did, it was just lost in the formatting ;) - ZeissS
did you restart the apache server? - sharpner
<VirtualHost *:80> DocumentRoot C:/xampp/htdocs/logosnap ServerName localhost </VirtualHost> <VirtualHost *:80> DocumentRoot C:/xampp/htdocs/new ServerName local </VirtualHost> - user418232
Yes i did restart... - user418232