On Wed, 16 Jul 2008 14:04:52 +0100 Martin MC Brown <dev at mcslp.com> wrote:
> Gentoo place the sample module configurations into conf.d, and then > use the defines system built into Apache to select which modules to > actually use. <IfDefine> and <IfModule> can make for a support nightmare: - luser wonders why [foo] doesn't work - luser has spent ages trying different configuration variants, comes to support channel in desparation. - luser posts configuration fragment. Should work fine! - Turns out none of it was in effect, because of an unsatisfied <IfModule> or <IfDefine>. > This means all the modules are always in /etc/apache2/modules.d, and > then an IfDefine within the module is used to determine which > modules to use. > > You then configure the module configs to be included by editing the / > etc/conf.d/apache file with the list of -D MODULE elements to > include on the command line. The trouble with that is that there's no general way to map modules to functions. That could work fine for particular modules like mod_userdir, but how do you present the user with mod_alias? I wouldn't want to rule out this option (and IfModule is worse than IfDefine), but anything that involves shielding the user from httpd.conf needs to be thought through at least to the point of where it leaves the user when they first need to adjust something "by hand". -- Nick Kew Application Development with Apache - the Apache Modules Book http://www.apachetutor.org/