Page 1 of 1

VirtualHost problem

PostPosted: 24. August 2005 09:33
by scranmer
After spending loads of time trying the different suggestions found in this forum (I even translated the greman ones), I still cannot get my setup working right, dont suppose anyone can help???

I have 2 pcs connected via a DSL router, PC1 with xampp and 2 folders in htdocs and PC2 running a browser to access the sites. I want to access them via http://bob or http://harry.


PC1 with xampp installed, httpd.conf has
NameVirtualHost 192.168.0.3

<VirtualHost 192.168.0.3>
ServerName bob
DocumentRoot C:/xampp/htdocs/bob/
</VirtualHost>

<VirtualHost 192.168.0.3>
ServerName harry
DocumentRoot C:/xampp/htdocs/harry/catalog/
</VirtualHost>


while lmhosts.sam has
192.168.0.3 bob
192.168.0.3 harry



I have tired to use *:80, with and without NameVirtualHost, I have added the lmhosts changes to PC2 and am now out of ideas.

Cheers

Simon.

PostPosted: 24. August 2005 09:56
by Bugman
Hello

1st off, try to get it to work on the PC With the xmapp on it.

The one with Xmapp on it, edit the hosts file and put the data with the ip address (use the localhost ip address first)

Other then that, i can't help you much, sorry.

Bugman

PostPosted: 25. August 2005 10:00
by scranmer
Bugman,

Thanks for the reply, I can get it to work on PC1 by using the standard call ip/folder but not the direct folder call :evil:

Anyone else any ideas?

Simon.

PostPosted: 25. August 2005 10:32
by Wiedmann
while lmhosts.sam has

You must use the file "HOSTS" in the same directory.

PostPosted: 25. August 2005 23:13
by taustin
Wiedmann wrote:
while lmhosts.sam has

You must use the file "HOSTS" in the same directory.


And furthermore. the "sam" at the end means it is a sample file to show the format for entries. "Hosts.sam" will not work. The file name must be "hosts" with no extension.

PostPosted: 02. September 2005 21:14
by scranmer
Thanks taustin / Wiedmann,

What a numpty :oops: ! I knew it would be something simple like that. Now just need to fixt the lost includes.

Notes for anyone else doing this... apart from editing the correct HOSTS file alos add these entries into the HOSTS file on each of the networked machines.

HTH

Si.