Forum Moderators: phranque

Message Too Old, No Replies

Why the heck doesnt this LAN server work?

         

kingoslo

10:26 pm on Dec 3, 2010 (gmt 0)

10+ Year Member



Hello,

I have setup a virtual host

<VirtualHost *:9900>
ServerAdmin webmaster@localhost
DocumentRoot "c:/wamp/www"
ServerName url.pews.info
ServerAlias 192.168.0.1
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
DirectoryIndex gauge.php
</VirtualHost>


And in the hosts file on the server:


127.0.0.3 url.pews.info


Now if I try and type
url.pews.info
,
127.0.0.3:9900
,
192.168.0.1
or anything else from any of the above information in the browser of a different computer connected to the same network, nothing happens. It doesnt load "c:/wamp/www/gauge.php", like I want.

What is wrong?

Thanks.M

dmwaff

5:24 pm on Dec 4, 2010 (gmt 0)

10+ Year Member



Update the hosts file on the "different computer", the client needs to resolve it.

url.pews.info 192.168.0.1

Adding it to the local host file of the server does not affect clients (other computers). You need a service like DNS or Active Directory for client resolvers to query.

kingoslo

1:57 pm on Dec 6, 2010 (gmt 0)

10+ Year Member



Thank you for your reply.

I have added the line you suggested to the host file of the other computer. This does not seem to work.M

dmwaff

2:05 pm on Dec 6, 2010 (gmt 0)

10+ Year Member



Make sure there is an empty line at the bottom of the host file and double check the ip address of the machine. 192.168.0.1 reads more like a gateway address than the ip of the machine you want to communicate with. Check the "IP Address..........." value under local area connection

ipconfig /all

topr8

2:26 pm on Dec 6, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



i'm no expert but if you want to choose the ip address yourself, don't you have to hard code the ip address into your DHCP server (normally your router on a home network), otherwise it just allocates an ip address to anything that is plugged in to the network.

also any reason you're using an atypical port number? normally you would use 80 or 8080,

9900 is not normally used for http

kingoslo

7:22 pm on Dec 10, 2010 (gmt 0)

10+ Year Member



No, you misunderstand. 192.168.0.1 is the ServerAlias.M

g1smd

9:37 pm on Dec 10, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The other computers on the network still need a way to be able to resolve the IP.

That entails modifying their HOSTS file, or supplying a DNS entry.

kingoslo

11:39 pm on Dec 10, 2010 (gmt 0)

10+ Year Member



No idea how I do that, and when looking at my router, it looked very confusing. Not a word about setting up DNS, only two options:

- DNS Server
- Dynamic DNS

Neither which looks very promissing.

I tried to edit the HOSTS file again, and it still doesnt work.

Should I not be able to type the IPv4 of the server computer in any of the client computers on the network? I tried that, but it didnt work.M

jdMorgan

2:47 pm on Dec 16, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> Should I not be able to type the IPv4 of the server computer in any of the client computers on the network? I tried that, but it didn't work.

If the IPV4 address is something like 192.168.x.x, as mentioned above, and if all the other computers trying to connect are on that same 192.168.x.x sub-net, then yes.

If you're having trouble doing that, then look into the firewall settings on the server.

Jim