How to set up web server accessible from inner network?

4

5

I'm assigned to create a webpage for all tenants in the house with this network composition:

This intranet web should be accessible from every computer within the network. I have access to the router closest to ISP modem and to the server PC, on which the web should be stored. This webpage should be accessible by name (let's say http://thishouse).

My question is... how to set it all up? The "easy part", web page with all the functionality is not the issue, but I have no experience with setting up intranet web server to run in setting like this.

kovike

Posted 2011-09-15T19:10:12.643

Reputation: 153

Why the two routers? Can the machines from 1.1 see the machines in 2.1? If so, a lot of your work is already done. Where are those client machines getting their DNS settings from? That's the second big chunk of the work. – Bart Silverstrim – 2011-09-15T19:18:21.747

I'm not sure at what point you're stuck here. Give it a static IP and tell everyone to add that IP and "thishouse" to their hosts file. – DerfK – 2011-09-15T19:18:57.100

Thank you Chris for migrating it. @Brat I was told that the guy who did this network doesn○t have wifi and he thought non-wifi router would be better and cheaper than one more long cable from the middle floor. People connected to bottom router somehow can't see people on the upper one. – kovike – 2011-09-15T19:30:18.977

You don't want this available outside the network (ie: to the Internet) correct? – Ƭᴇcʜιᴇ007 – 2011-09-15T19:33:28.883

You mean router, or switch, @kovike? – Bart Silverstrim – 2011-09-15T19:35:01.110

1I'm at a loss for why you have two routers complicating things. A couple of switches and one router should do, and would cut down on your headaches, depending on how many machines you're talking about here. – Bart Silverstrim – 2011-09-15T19:35:41.997

It is router. But afaik it can function as switch too, right? And it shouldn't be accessible from outside, yeah. – kovike – 2011-09-15T19:45:43.923

...what kind of "router" is it? – Bart Silverstrim – 2011-09-15T20:02:43.363

TP-LINK TL-R402M – kovike – 2011-09-15T20:13:51.403

Answers

5

  1. Install the web server... I recommend "Cherokee", or if you have a Mac, Just go to "System Preferences" and then "Sharing" and enable "Web Sharing". Let's say the Server in this case - has the address of 192.168.2.200.

  2. Hopefully, you can access the hosts file on every machine, in which case you just put an entry for your thishouse server in each computer's hosts file... for example..

127.0.0.1 localhost

255.255.255.0 broadcasthost

::1 localhost

192.168.2.200 thishouse thishouse.com www thishouse.local

  1. If not, you will need to "localize" the DNS resolution. You can use the "Server" for this, by installing a simple DNS server. I like DNSMASQ. A sample config might look like...

# Add domains which you want to force to an IP address here.

address=/thishouse/192.168.2.200

# Add other name servers here, with domain specs

# if they are for non-public domains.

server=/localnet/192.168.2.200

server=8.8.8.8 # google's DNS Server, to "go online"

  1. Then you a: point your ISP router's DNS to your internal server (192.168.2.200), and aa: have it provide DNS at it's address .1, to the internal LAN, using the .200 server to actually resolve local and "remote" addresses... or bb: just use the .200 address on ALL machines to do DNS resolution.. Having the router do this is more reliable and doesn't require any configuration.

This is simple stuff, but it actually takes years to realize how it all fits together. Hope this helps.

mralexgray

Posted 2011-09-15T19:10:12.643

Reputation: 668

Looks like I can't upvote yet, but thanks for the reply, certainly brought a lot of light to this for me. – kovike – 2011-09-15T20:22:50.303

1

Provided you have the right firmware, IMO the best setup would be to utilize a DNS Forwarder that is basically a miniature name server for the LAN hosts. Open source router firmware like Pfsense or DD-WRT will have this feature. As an example, check out this link for general info on the Pfsense DNS Forwarder: http://doc.pfsense.org/index.php/DNS_Forwarder .

Also, it is not surprising that the hosts in each of you subnets are not visible to each other. Setting aside the technical details, I will say that a switch will likely be more appropriate instead of the bottom-most router in your diagram.

Somantra

Posted 2011-09-15T19:10:12.643

Reputation: 320

0

For windows user

  1. Just Download Xampp and create your website on localhost.
  2. After that goto on cmd and type ipconfig command.
  3. look the ip address of your system somthing like (192.16.1.11).
  4. Paste ip address into another system's browser. (NOTE: Both systems are connected with same network)
  5. Hit enter.

(LOOK WHATS HAPPENED)

Shamsher Sidhu

Posted 2011-09-15T19:10:12.643

Reputation: 1