R
R
Ruslan Banochkin2011-06-24 23:02:20
Nginx
Ruslan Banochkin, 2011-06-24 23:02:20

Web server on local network?

Khabravchane, need help. Today, as the most "advanced computer scientist" they turned to me, we need help.

There is a small office. There is a server in the office, as well as 5 users (sometimes more, sometimes less), mostly with laptops, as well as a Netgear router. The network was created through this router, that is, the server and other users are connected to it (it seems like everything is using wi-fi).

The task is as follows: the main one wanted, for example, instead of the site vkontaktah.com, to open his own site on the office server, set it up, and all users instead of the site vkontaktah.com opened their own site on the server.

I don't know how to describe it correctly, but I'll try. It is necessary so: the user entered the address into the browser. If this address is not "crammed" on the office server, then open it on the Internet. If it is "loaded" - load the site from the office server.

It is also important that you do not have to edit anything on users' computers (for example, the hosts file).

It is also necessary that the site folders be located in a separate folder, in home. For example, the site vkontaktah.com should be located in /home/server/public_html/vkontaktah.com/.

It took a long time to figure out how to describe everything, I hope it's clear.

The most annoying thing is that you can’t connect the Internet at the beginning to the server, but from the server to the router. Already found under such mana, but it can not be done. It is necessary that the Internet be connected to the router at the beginning, then both the server and users are connected to it.

The router was taken on my advice - Netgear WNR3500L-100RUS. The server is an old machine on the 4th stump and with a gig of RAM. On it the server ubunt is spinning.

I asked on Habré something similar, but here it is a little different.

The office is still "poor", so the administrator cannot be hired. And yes, you need help. Habr, help me help a good friend. :)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
U
uncia, 2011-06-24
@uncia

Netgear WNR3500L - install the Tomato firmware and resolve the necessary domains to your server in dnsmasq.
I suspect this is not an office, but a computer club where you are going to steal clients' passwords...
If so, then it will affect your karma...

X
xaker1, 2011-06-24
@xaker1

We raise DCHP and DNS (caching) on ​​the server. Disable DCHP on the router.
We configure DCHP to return as a gateway - router ip, and as DNS - server ip.
Further, if you need to block any site, create a virtual host (on the www server) with the desired ip address, and also create a zone in dns for the desired domain (A records point to the local address of the server).
I hope I explained clearly.
In principle, it is not necessary to create a virtual host for each domain - apache (others too) will be on the first virtual host by default (of course, this option, if you do not need to create an individual page for each blocked domain).

K
Kindman, 2011-07-04
@Kindman

And, you also need to filter DNS requests to the “wrong” DNS servers, as well as HTTP requests with the Host header: with the “wrong” host, and also, in general, all TCP requests to the “wrong” IP addresses , and stop all attempts to use a web proxy, including Opera Turbo.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question