Re: httpd won't start and no error entries in error_log

From: Vlad D. Markov (markov_at_monmouth.com)
Date: 03/29/04


Date: Sun, 28 Mar 2004 20:16:10 -0500

On Sat, 27 Mar 2004 10:55:42 -0700
Andrew Falanga <andy@spam.me.not> wrote:

<snip>
> Ok here's the deal. I installed apache 1.3.28 from the OpenBSD
> packages collection (basically, a prebuilt version for the platform on
> which I am running OpenBSD 3.4 (this is for those in the c.i.w.s.u
> newsgroup)). Then, using the same method, installed php. However, the
> prebuilt php package didn't have postgresql support compiled in to it.
>
> So, I removed that package and downloaded the sources myself and built
> php with the support installed. All went well, I configured, I made
> and installed.
>
> Now, when I type httpd on the command line, all that happens is the
> prompt is returned and the server doesn't start. There's no errors
> written to stdout, stderr or /var/www/logs/error_log. However, when
> doing echo $?, I see that apache returns a integral value of 4. Does
> anyone know that this means?
>
<snip>

> Prior to this installing of php (separate of the prebuilt version),
> apache was working just great.

When I got this error running OBSD chrooted apache, the code was unable
to find a library. Being chrooted Apache sees a different directory
structure rooted at "/var/www". So - it doesn't see /usr/local/lib
unless there is one at "/var/www/usr/local/lib". This stuff gets pretty
complex because the missing bits & pieces have to get into the chrooted
directory structure. For example I needed many things from "/etc" like
resolv.conf, hosts, and more for network connectivity. "ldd" can show
you the required shared libraries for an application. The man pages are
excellent for system calls. Its not easy doing this yourself.

This is not a whole lot of fun for people just interested in developing
a web application locally. Some of us find it a nice example of another
level of system protection.The OBSD folks made the ports work well so
this is hidden from most users.

I found the statically compiled bash shell to be very useful, I could
run the shell chrooted and see the problem a bit more closely.

Have Fun,
Vlad



Relevant Pages