Page 1 of 1
how to set a computer as a server in LAN network?
Posted: Sun Nov 02, 2008 1:21 am
by azhan
hey guys!.
I already set up a database using xampp, now im trying to connect the pc (with xampp installed) with few pc using switch of 4 ports.
I try to type the server ip address like this 192.168.1.100/patientreg.php..from another pc.....but the page returns "too long for response"...but i already connect all the PCs via switch of 4 ports....
do i need to setup/ key in the ip address of the server in the router??
im really bad at network configuration...huhuh
thanks
Re: how to set a computer as a server in LAN network?
Posted: Sun Nov 02, 2008 1:56 am
by alex.barylski
I'm not sure if a switch is much different than a router which is what I have...but I use ifconfig/ipconfig to determine the name of the XAMPP server or whatever WAMP/LAMP distro you use and enter that IP directly and it works as expected, both on Windows XAMPP and Debian LAMP.
I do get errors when I try to access my server from outside of the router and I haven't yet opened the port 80...I wonder if this might be something your experiencing.
Does the page serve fine when you access it from localhost? Have you tried using the IP directly from the server as well?
Not much help sorry, I'm interested in hearing what the problem is though and the solution...
p.s-This would proabbly be answered faster in Linux forum...
Re: how to set a computer as a server in LAN network?
Posted: Sun Nov 02, 2008 6:29 am
by VladSun
OS?
Re: how to set a computer as a server in LAN network?
Posted: Sun Nov 02, 2008 4:24 pm
by alex.barylski
Incase OP doesn't reply...I'm sure there would be differences but for the sake of learning could you explain what might be the problem in either case?
IP tables? How and why? I'm curious.

Re: how to set a computer as a server in LAN network?
Posted: Mon Nov 03, 2008 6:19 am
by VladSun
The OP has to answer too much questions before getting the soltution that will work

A few of them:
- this 4-port switch is a very odd hardware - suspicious

;
- check the IP settings for every one of these PCs - they must be in a single network segment (192.168.1.0/24 in this case);
- check for PING replies or ARP entries (in case a FW is running);
- `netstat -ntap` on server machine to check IPs Apache listens to;
- `iptables -nxvL`, `iptables -nxvL -t mange`, `iptables -nxvL -t nat` - to check whether FW rules have droped packets;
And finaly - `tcpdump -n port 80` on server machine to see TCP/IP trafic.
Re: how to set a computer as a server in LAN network?
Posted: Tue Nov 04, 2008 9:32 am
by kamalnisa
Hi
It s very simple to setup network and server setup. Suppose you have 3 PC and 1 server. You have to connect all PC to same switch first.
Then just configure different IP's 4 machine. Subnet should be same.
Now your network is ok. There is nothing different configuring server or PC to the network.