Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible with a few laptops (with wifi cards) and a working BT Home Hub* (all machines can connect to internet) to get a simple private home lan going?

From one machine I can ping another by IP address (and I see that the Home Hub can give static addresses to the same machine). But how would I - for example - set up a web server locally on one of the machines and then access those web pages from another machine?

Is this possible? Does it need some kind of hardware or DNS tinkering?

I can I simply play with /etc/hosts files? [nothing but linux over here ;-) ]

I'm a web developer by trade you see and my vision is that I have my regular worksation BUT with another laptop being used as a web/database server.

Possible or just a pipe dream?


*Or for non-Brits a "wireless broadband router" ;-)

share|improve this question

migrated from serverfault.com Dec 19 '09 at 21:09

This question came from our site for professional system and network administrators.

    
I should add that I'm comfortable setting up the webservers and database servers, but I would like to know what steps to perform on each machine to get them talking to each other (in this private home network context). –  Mark Dec 19 '09 at 20:02
    
GOod comments so far - thanks. I think I'm getting there. It seems that I can connect out-of-the box (and without playing in the HOSTS file) to somecomputer.home or what-have-you. BUT,,,, it simply says "Blocked!" in the browser. I'm lost! –  Mark Dec 19 '09 at 20:33
1  
As a security measure, some web apps disallow access form computers other than localhost. That's probably what you are getting. –  alfplayer Dec 20 '09 at 13:53

2 Answers 2

You shouldn't have any problems with this. As you said, HOSTS file can be used for DNS resolution. Hell, you could access the website by IP address if you really wanted. Since you don't sound like the sysadmin type, you probably don't want to bother setting up a local DNS server, although that's certainly an option too.

Actually setting up the webserver itself is relatively straightforward. In Linux, you can probably pull down Apache from your distribution's repository. (eg: yum install httpd) Then you simply need to get it configured to serve up your content. A basic httpd.conf doesn't need too much to provide basic html.

More effort needs to be put into setting up PHP, MySQL, and other apps. But it's all definitely possible.

If you don't mind starting from scratch, I know RHEL/CentOS has options during install for a webserver, which will probably include a good number of components you'll want.

And a word of security, you'll want to use WPA2 encryption on your wireless, with a good long key. You'd probably rather not have any random wardriver to have access to your webserver.

share|improve this answer

If the computers are connected to a router and they have IP addresses within a subnet your LAN is set up. It is private unless something like DMZ, NAT port forwarding or some other mechanism to allow public access is enabled.

You can set up a web server (including PHP) and MySQL server installing the packages for your distribution (e.g. called apache and mysql-server on Ubuntu). Everything will probably just work, but there may be additional configuration step that must be followed (see documentation specific to your distribution).

To access other computers you don't need to set up a DNS server and it probably doesn't make sense to do it unless there is a specific feature you need to test. You can access/refer to other computers by their IP addresses or by a hostname after adding it to the hosts file.

On Ubuntu (and probably other distributions), avahi-daemon runs by default. This means that mDNS (multicast DNS) service is available by default and you can access other computers on the LAN like this: hostname.local. (e.g. christopher-desktop.local.).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.