On 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.
Uh, the Listen directive doesn't do what you seem to think it does. It
specifies what network interfaces to listen on (bind to), not what
machines on the network are able to connect. I'm not sure why it makes
any difference which machines are turned on since Listen is about the
network interfaces on the machine that is running Apache. I think you
forgot to tell us something. Anyway, read this for what Listen does:
<http://httpd.apache.org/docs/2.2/bind.html>
You want Apache to listen on the IP address of the machine's network
adapter, or all local interfaces (Listen 0.0.0.0:80). Then all of the
machines on that network will be able to connect.
I would hope that your home network is connected through some kind of
router/firewall device. If so, then you're done, nobody from outside
will be able to connect to your Apache server. If not, then you should
get one today.
Or read this about the Allow and Deny directives:
<http://httpd.apache.org/docs/2.2/howto/access.html>
<http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow>
--
-| Bob Hauck
-| A proud member of the unhinged moonbat horde.
-|
http://www.haucks.org/