Fix "graceful" action in init script when mod_chroot is enabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apache2 (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Binary package hint: apache2
The init script uses "$APACHE2CTL graceful $2" to gracefully restart/reload Apache.
This will fail however when using mod_chroot (where Apache itself gets chrooted), and therefore the init script should fallback to "restart" in this case for "reload", "force-reload" and "graceful".
This might get done by adding the following code to "reload":
if [ -f /etc/apache2/
# mod_chroot is loaded. "graceful" won't work.
apache_restart
else
# normal reload code
fi
The current block from "restart" would get abstracted into a "apache_restart" function, which would get called in case mod_chroot is loaded/enabled and for when "restart" itself is requested.
I have code like this in the "dpkg-old" init script, but do not remember if I had written it myself.
This should get forwarded/applied to the Debian package, too - I'd just like to get some feedback before forwarding it.
Changed in apache2 (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Triaged |
Which version of apache are you using? Since 2.2.10, it supports chroot without additional modules. And if that breaks graceful restart, that should be fixed.