how to set a computer as a server in LAN network?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
azhan
Forum Commoner
Posts: 68
Joined: Fri Jun 27, 2008 6:05 am

how to set a computer as a server in LAN network?

Post 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
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: how to set a computer as a server in LAN network?

Post 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...
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: how to set a computer as a server in LAN network?

Post by VladSun »

OS?
There are 10 types of people in this world, those who understand binary and those who don't
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: how to set a computer as a server in LAN network?

Post 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. :)
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: how to set a computer as a server in LAN network?

Post 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.
There are 10 types of people in this world, those who understand binary and those who don't
kamalnisa
Forum Newbie
Posts: 3
Joined: Tue Nov 04, 2008 9:25 am

Re: how to set a computer as a server in LAN network?

Post 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.
Post Reply