Fix "graceful" action in init script when mod_chroot is enabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| apache2 (Ubuntu) |
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 |
Stefan Fritsch (sf-sfritsch) wrote : | #1 |
Daniel Hahler (blueyed) wrote : | #2 |
That would be nice to have as a built-in functionality, but apparently it differs from mod_chroot.
I have added "ChrootDir /var/www" to /etc/apache2/
I am getting the following error (only /var/www/
/var/www/
Apart from that there appears to be another problem, fastcgi processes (PHP) return "Service Temporarily Unavailable", while requests to normal resources (image) work fine.
This is likely also related to the order in which chrooting and spawning the fastcgi processes happens.
I am using mod_fastcgi.
Clint Byrum (clint-fewbar) wrote : | #3 |
Dropping from "Triaged" to "Confirmed". This bug likely needs to be verified on recent versions of apache2 and forwarded before fixing it.
Changed in apache2 (Ubuntu): | |
status: | Triaged → Confirmed |
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.