10 Apr 2002 (updated 10 Apr 2002 at 16:45 UTC)
»
apache2
Been trying to get the FreeBSD port of apache2 running on
a 4.5 box, but the default configuration
doesn't seem to work (we've been hosed Tommy...we've been
hosed...). It just quietly sits
there and does nothing, other than note in the error log:
"Digest: generating secret for digest authentication ..."
Strangely, it also doesn't create a /var/run/httpd.pid
file, and only preforks 1 process. However, if I run it with
the highperformance.conf file (after a few tweaks - the port
must not adjust that for FreeBSD), then
I do have a working server - but with not many features. So
I'm guessing the software itself
is ok, but the httpd.conf that the FreeBSD port installs
must be munged up somehow - but there's
no obvious sign of what exactly.
A few moments later..
It's amazing how once you write something down and look
at it, you sort of answer your own questions. That "..." at
the end of the message about "generating secret for digest
authentication" made me think something is starting, but not
finishing. Disabling the auth_digest_module does the trick.
Must be something in apr_generate_random_bytes, the
mod_auth_digest source says: generating the secret takes a
while (~ 8 seconds), but I'm sure I waited much longer than
that. I'm flood-pinging my machine right now, but httpd
still hangs trying to generate those 20 random bytes.
I probably won't be using digest authentication for
anything, so that's no biggie to disable - but I'd be a bit
worried about other modules, maybe later down the road,
calling apr_generate_random_bytes and waiting forever.
even later..
I'm learning all kinds of good stuff today, I found that
by using the FreeBSD rndcontrol utility, I could add IRQ 10
(what my NIC uses) as a source of randomness, and now
apache2 starts with no noticible delay at all, even with
mod_auth_digest loaded. So the port will work
out-of-the-box, as long as you help the kernel's RNG a bit.