View Single Post

  #5 (permalink)  
Old 09-03-2006
Robert Heller
 
Posts: n/a
Default Re: apache2 configuration question

At Sun, 03 Sep 2006 14:09:40 GMT Richard Kimber <rkimber@ntlworld.com> wrote:

>
> I run apache2 on my home network. I don't want apache2 to accept requests
> from outside this network. However, not all the machines in the network are
> switched on at any given moment.
>
> I have Listen 127.0.0.1:80, which is fine for the machine that runs apache2,
> but if I add the address of a machine that is not actually on, apache2
> won't start.
>
> How do I configure apache2 so that, other machines will be listened to, when
> switched on, without my having to reconfigure and restart each time? Or am
> I misunderstanding what's involved?


You are misunderstanding what's involved -- thew Listen statement
defines the IP and port numbers on the *server* machine. Your server
machine actually has (at least) two IP numbers: the loopback device
(127.0.0.1) and your LAN (ethernet) address. It may also have a
(dynamic) IP number for PPP (if you use PPP dialup). You might also have
a second NIC connected to your broadband, which will have its own
(dynamic) IP number.

What you want to do is add a 'Listen <serveripnumber>:80' statement. Or
just 'Listen 80'. Then you need to configure your *firewall* to block
connects from off your LAN. Either set it to block connections from
your ppp network device (if you are using PPP) or to block connections
from the other side of your local router. If you are on a broadband
connection and are using an extern broadband router, you configure this
on the broadband router, since it is your firewall. If you are using
your main server box as the broadband router (and firewall) and you
have two NICs,one connecting to the broadband and one to the home LAN,
you just block http connections from the NIC connecting to the
broadband service (cable or DSL or sat modem).

>
> - Richard.
>
>


--
Robert Heller -- 978-544-6933
Deepwoods Software -- Linux Installation and Administration
http://www.deepsoft.com/ -- Web Hosting, with CGI and Database
heller@deepsoft.com -- Contract Programming: C/C++, Tcl/Tk

Reply With Quote