VirtualHost & HOST file server access across a network.

Hi there,

I have two computers networked via a router:

eg:
\\comp1
\\comp2

\\comp1 is running apache with a few virtualhosts set up in the httpd.conf file

They look like this:

Code:
<VirtualHost 127.0.0.1>
ServerName fused
DocumentRoot "C:/as/www/fused/"
</VirtualHost>

<VirtualHost 127.0.0.2>
ServerName fb
DocumentRoot "C:/as/www/fb/"
</VirtualHost>
the HOSTS file for \\comp1 looks like:

Code:
127.0.0.2 fb
127.0.0.1 fused
When i type http://fb/ or http://fused/ in the browser on \\comp1, it takes me to the correct directory, however, on \\comp2 i have my HOSTS set up like this:

Code:
192.168.1.149 fused
192.168.1.149 fb
where 192.168.1.149 is the IP of \\comp1

and when i visit http://fb/ or http://fused/ on \\comp2 it takes me to the same directory. (Obviously)

But that is not the problem, the problem is that i dont know how to modify my conf file and hosts file to access fb and fused on \\comp1 FROM \\comp2.

I have tried to add:

192.168.1.149:81 fb

To my hosts file on \\comp2, along with Listen 81 in httpd.conf on \\comp1, but this doesnt allow me to access it... VirtualHost & HOST file server access across a network.

Can anyone shed any light on this?

If you need more info just ask as this isnt really that clear lol

Thanks in advance
Rob.

 

 

 

 

Top