Hi Nick, >> >> 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>.
I appreciate what you are saying (And I'm guilty of it myself), but if the people answering questions know the way system works then they know which question to ask first :) Alternatively, and I guess this is even more unlikely, we could expect people to read the manual? ;)) Seriously though, I think you will have problems with any solution if people don't use it properly. Afterall, a2enmod operate by symbolic links, and I've seen people edit the config files but not enable the file, and you end up with the same problem. They edited the files, the config looks like it will work, but because the symbolic link was never create the file is never loaded by Apache. Same, ultimate, problem. >> 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? It's not my system, so I'm not going to defend it's merits, but compared to providing, using and supporting yet another tool, compared to using an existing method that works within the existing OpenSolaris framework, I know which I would choose. > 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". Then neither this method nor a2enmod/a2dismod are going to work :) Is there a better solution that we can develop that doesn't employ either solution? MC -- Martin 'MC' Brown, mc at mcslp.com and mc at mysql.com Technical Writer, Database Group, Sun Microsystems Everything MCslp: http://planet.mcslp.com