Apache - virtualhost - works only one

Posted by user1811829 on Server Fault See other posts from Server Fault or by user1811829
Published on 2012-11-15T08:13:29Z Indexed on 2012/11/15 11:07 UTC
Read the original article Hit count: 269

Filed under:
|
|

I need a couple of virtualhosts on my local dev machine. Unfortunately it needs to be windows.

httpd-vhost.conf

<VirtualHost *:80>
  ServerAdmin [email protected]
  DocumentRoot "C:/xampp/htdocs"
  ServerName localhost
</VirtualHost>

<VirtualHost *:80>
   ServerAdmin [email protected]
   DocumentRoot "C:/xampp/htdocs/manadom.local/public"
   ServerName manadom.local
   ErrorLog "logs/manadom.local-error.log"
   CustomLog "logs/manadom.local-access.log" combined
</VirtualHost>

<VirtualHost *:80>
  ServerAdmin [email protected]
  DocumentRoot "C:/xampp/htdocs/galeriabiznesu"
  ServerName gb.loc
  ErrorLog "logs/gb.loc-error.log"
  CustomLog "logs/gb.loc-access.log" combined
</VirtualHost>

And hosts file:

127.0.0.1 localhost
127.0.0.1 manadom.local
127.0.0.1 gb.loc

The problem is: localhost points to

C:/xampp/htdocs/manadom.local/public

manadom.local points to

C:/xampp/htdocs/manadom.local/public too

gb.loc points to

C:/xampp/htdocs/manadom.local/public

I can't idea what's wrong?

Please help me, i'm not an admin but i read about it lot and i don't know what possibly i can do wrong.

© Server Fault or respective owner

Related posts about apache2

Related posts about xampp