Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 267634 - www-server/apache should not depend on network
Summary: www-server/apache should not depend on network
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-27 09:18 UTC by Guido Flohr
Modified: 2009-04-27 21:08 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guido Flohr 2009-04-27 09:18:21 UTC
/etc/init.d/apache will refuse to start if only the loopback interface is up.  Why? Apache runs perfectly alright with the loopback interface.

If someone really configured Apache to depend on a certain interface and/or ip address, Apache will gracefully fail.  There is no need for an additional check in the startup script.  On the other hand, having to start Apache manually, when no external network is available, is usually a nuisance.
Comment 1 Allen Brooker (AllenJB) 2009-04-27 09:30:00 UTC
Most setups want Apache to run on an external interface, so requiring the network to be up is a sensible default. You can configure when Gentoo considers "net" to be up via /etc/conf.d/rc with RC_NET_STRICT_CHECKING.
Comment 2 Guido Flohr 2009-04-27 10:12:08 UTC
"Most setups want Apache to run on an external interface ..." I seriously doubt that, since it would require hardcoding ip addresses into the web server configuration, a thing that most people try to avoid for good reasons.

The default Apache setup, also for Gentoo, does not require any interface being up, apart from the loopback interface.  People that explicitely configure hardcoded IPs into their web server setup, will be smart enough to understand Apache's error messages, when a required interface is not up.

About changing RC_NET_STRICT_CHECKING: That would mean that I should - for example - allow sshd to start on the loopback interface only, although this really doesn't make sense.  sshd is useless without external connectivity, Apache isn't.
Comment 3 Benedikt Böhm (RETIRED) gentoo-dev 2009-04-27 21:08:54 UTC
(In reply to comment #2)
> "Most setups want Apache to run on an external interface ..." I seriously doubt
> that, since it would require hardcoding ip addresses into the web server
> configuration, a thing that most people try to avoid for good reasons.

you seem to confuse hardcoding ip addresses vs. bind on all interfaces but still desire that apache binds to an external interface
 
> About changing RC_NET_STRICT_CHECKING: That would mean that I should - for
> example - allow sshd to start on the loopback interface only, although this
> really doesn't make sense.  sshd is useless without external connectivity,
> Apache isn't.

you should upgrade to openrc and use rc_need="!net" in /etc/conf.d/apache2 as documented in /etc/rc.conf