Hello

I am and have been following current for a few years now.

At some point a couple of years ago, I decided to use apache2 from the
"apache-http" package (currently at version apache-httpd-2.4.23.tgz in current).

I have installed apache2 using the ChrootDir directive to chroot it to /var/www.
Therefore, I also added 'apache2_flags="-T"' to rc.conf.local, otherwise apache2
won't start because it can't find the document directories (e.g. "/htdocs" does
not exist, and httpd2 tries to check it rather than "/var/www/htdocs").

I then noticed that using rcctl to restart apache2 would fail.
Apparently, when "apachectl2 graceful-stop" is invoked, it also tries to verify
directories, and when it can't find them, throws an error.

My solution was to change, in /etc/rc.d/apache2:

rc_stop() {
        /usr/local/sbin/apachectl2 graceful-stop
}

To:

rc_stop() {
        /usr/local/sbin/apachectl2 graceful-stop ${daemon_flags}
}

Then, rcctl stop/restart work as expected.

Of course, this means that every time I update current, the apache2 package does
not want to update and gives:  "Couldn't delete /etc/rc.d/apache2 (bad
checksum)"

It's not that big a deal, but a bit annoying.  I rerun the package update with
the partial package, then I go to etc/rc.d/apache2 and add back the
"${daemon_flags}" to the rc_stop function.

But, I am wondering, is there any specific reason not to include
"${daemon_flags}" in the rc_stop function to begin with?

If not, could it be added?

Thanks

Ted






Reply via email to