Nagios 1.2 and OpenBSD. CGI issues
Andreas Ericsson
ae at op5.se
Wed Sep 15 15:41:35 CEST 2004
nemir nemiria wrote:
> Hi there!
>
> I have just configured nagios under OpenBSD and it was all great until
> I got up to the bit where the CGI's try to run.
>
> OpenBSD by default sets up a chrooted environment for httpd under /var/www,
> and rather than turn this off I am attempting to make everything happy
> within this restriction.
>
[....]
>
> Sadly, any cgi I click gives me the following output:
>
> "The server encountered an internal error or misconfiguration and was
> unable to complete your request...."
>
>
> Tha nagios log just says it started okay.
The nagios daemon has nothing to do with the cgi's, except that it
collects the data they display.
> the messages file jsut has nothing relevent in it, just stuff about
> the checks it is doing.
>
> The apache error_log says:
>
> "[Thu Sep 16 05:53:06 2004] [error] [client 172.32.30.166] Premature end of script headers: /htdocs/usr/local/nagios/sbin/status.cgi"
>
> a search of the faq revealed something that seemed not relevent about
> suexec not liking group writable permiossions. I followed its advice anyway.
>
> Is there an issue with these CGI's not working in a path other than the one
> they were compiled for?
>
Not with these CGI's in particular, but with binaries in general.
First, you'll have to either compile the cgi's statically so they don't
need any libraries or copy the relevant libraries to where the chrooted
cgi's expects to find them. Compiling the cgi's statically is way
preferrable, since you won't need to copy anything to the chroot jail
that might give away what system you're using.
Secondly, you'll have to make sure the cgi's can read status-logs and
such from within the chroot jail.
If you get the first step running but not the second, the cgi's will
tell you that they can't read status data and so on, and throw an error.
> regards,
>
> Nemir
>
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Lead Developer
-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list