Summary: | www-servers/apache-2.4.x Relocate ServerRoot to /etc/apache2 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Nathan M <nmalinoski> |
Component: | Current packages | Assignee: | Apache Team - Bugzilla Reports <apache-bugs> |
Status: | IN_PROGRESS --- | ||
Severity: | enhancement | CC: | djc, mjo |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Nathan M
2016-08-23 03:04:40 UTC
To be honest, ServerRoot has been set to this value since I took over maintenance of apache. So unfortunately I don't know the historical background why ServerRoot was set to this value. I don't see a compelling reason to not change it but I'd like to collect some other opinions beforehand. So to some extent, this is relative paths for modules versus relative paths for configuration, right? If so, I think I agree the latter makes more sense. Also, aligning with other distros can be helpful. If we do this, it definitely merits a news item, right? It's kind of an arbitrary choice, but I think having the modules under /usr/lib/apache makes sense and symlinking them under /etc would defeat the purpose. Now, we need to use an absolute path for configuration Includes. If we change it, we'd need to use absolute paths for LoadModule and anything that wants to include a file under the current ServerRoot. If most users are going to have to hard-code one of the paths, then /etc/apache2 is a lot easier to hard-code than /usr/$(get_libdir). I have a package (a bunch of config files that include each other) that would need a new build system to figure out libdir and substitute it everywhere. I'm sure there are others in the tree. I'll try to think up a way to make this work that doesn't require hard-coding one of the paths. In the meantime, let me throw out a stupid workaround: everywhere you have an Include, you can replace it with two IncludeOptionals that try both paths. I don't understand why there would be a problem with adding symlinks to /etc/apache2, but if this is indeed a legitimate concern, some inspiration may be pulled from Tomcat on RHEL: On RHEL 7, Tomcat's ServerRoot equivalent is off in /usr/share/tomcat, which contains the binaries in a bin directory and symlinks to all other expected directories (conf, lib, logs, temp, webapps, work). If we adapt Apache HTTPd on Gentoo to this layout (Which could also serve as a cross-distro template), ServerRoot would become something like /usr/share/apache2 and would contain, at the very least: - conf -> /etc/apache2 - logs -> /var/log/apache2 - modules -> /usr/lib[64]/apache2/modules - vhosts.d -> /etc/apache2/vhosts.d Personally, I'd like to see these as well: - htdocs -> /var/www - ssl.crt -> /etc/ssl/apache2 - ssl.key -> /etc/ssl/private And if we wanted to keep going, perhaps: - conf.d -> /etc/apache2/modules.d - conf.modules.d -> /etc/apache2/modules.d (In reply to Nathan M from comment #4) > I don't understand why there would be a problem with adding symlinks to > /etc/apache2 It's not a major concern -- I just think that the modules "belong" under /usr/lib, and symlinking them to /etc just means that they'd be in the wrong place *in addition to* the right place. For most of our users, that will just create confusion, where half of their directives reference the real path and half reference the symlink. It will then be impossible to undo if we ever decide it was a bad idea. Since this is a rare use case, the benefit of the change needs to be big. If all you want is to make your configurations portable, can you create /etc/apache2/modules -> /usr/lib/apache2/modules symlinks on your Gentoo machines, and then set ServerRoot to /etc/apache2? Those symlinks are only needed if you change the ServerRoot (i.e. if you're doing something weird), so they should probably only be created on those machines, and not preemptively for everyone. |