Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 532710

Summary: www-servers/apache: move conf.d file to a /etc/apache.modules.conf or similar?
Product: Gentoo Linux Reporter: Pacho Ramos <pacho>
Component: Current packagesAssignee: Gentoo systemd Team <systemd>
Status: CONFIRMED ---    
Severity: normal CC: mjo, polynomial-c, systemd
Priority: Normal Keywords: NeedPatch
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: Patches are highly welcome
Package list:
Runtime testing required: ---

Description Pacho Ramos gentoo-dev 2014-12-16 16:03:07 UTC
Currently, systemd unit file for apache is relying on /etc/conf.d/apache to get important options like what modules to load (please note that the eclass tell people to specify them there).

I think parts common to every startup system should be placed at other file in /etc because of the explained at:
https://wiki.gentoo.org/wiki/Project:Systemd/conf.d_files

The only variable that is being handled in our unit file is APACHE2_OPTS... but that one is used for many purposes, and we need to honor it to let people to specify there the modules that need to be activated or not :/

What are your suggestions for this? Should we have a dedicated "MODULES=" variable in a common /etc/apache... config file to allow all people to specify modules there for all?
Comment 1 Michael Orlitzky gentoo-dev 2014-12-17 14:19:04 UTC
With apache-2.4, we can move this configuration under /etc/apache2:

  http://httpd.apache.org/docs/trunk/mod/core.html#define

Prior to 2.4, there was no way to enable/disable sections of the config programmatically, and obviously we want to ship working configs for the modules, even if they're not going to be enabled right away. So passing -D at startup was the only way to do it, and that meant messing with the init system somehow.

With the new "Define" directive, we can stick the "-D" equivalents in, say, /etc/apache2/httpd-modules.conf. The "Define"s need to come before any other configuration, so we would have to include it at the very top of httpd.conf with,

  Include /etc/apache2/httpd-modules.conf

Then users would just add,

  Define PHP
  Define SSL
  ...

to that file. The rest of the configs shouldn't need modification that way. It's even backwards-compatible, since the definitions will stack.
Comment 2 Pacho Ramos gentoo-dev 2014-12-17 14:27:48 UTC
That would be nice for us (systemd) :)
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2015-02-07 08:12:21 UTC
If you provide patches for review that would be nice.