cgi or apache problem with nagios 3

mashtin.bakir at gmail.com mashtin.bakir at gmail.com
Thu Aug 14 16:25:31 CEST 2008


Inheritted a nagios 3.0.2 install on suse 10.1-32 bit. All parts were
working recently but someone did something....

Specifically, the CGIs don't seem to work; firefox asks if you want to save
trends.cgi or statusmap.cgi
to disk or run it with a particular local utility. The really wierd thing is
this install has nagiosgraph in it which
uses cgi pages to generate the rrd, png pages.

So I backed up everything (configs in particular) and reinstalled all
pieces.
./configure --with-cgiurl=/nagios/cgi-bin --with-htmlurl=/nagios/
--with-nagios-user=nagios \
 --with-nagios-group=nagios --with-command-group=nagios

No errors, it finds GD library but says
Package glib-2.0 was not found in the pkg-config search path

so I  try to build andinstall glib-2.0.7
Gives a few warnings but seems to complete but doesn't seem to install
files.
I copy glib-2.0.pc to /usr/local/lib  and
export PKG_CONFIG_PATH=/usr/local/lib

do an ldconfig, go back to the nagios area and
make clean  and run configure again,

at the very end, while compiling statusmap.cgi etc I see an
undefined reference to `gdImageCraeteFromJpeg` but everything
else is happy

Not sure if the above (glib) is a problem as again, nagiosgraph runs fine.

My httpd.conf has the following in it

ScriptAlias /nagiosgraph/ /usr/local/nagios/nagiosgraph/
<Directory /usr/local/nagios/nagiosgraph>
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>


ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
<Directory "/usr/local/nagios/sbin">
    Options ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all
    AuthName "Nagios Access"
    AuthType Basic
    AuthUserFile /usr/local/nagios/etc/htpasswd.users
    Require valid-user
</Directory>

Alias /nagios /usr/local/nagios/share
<Directory "/usr/local/nagios/share">
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
    AuthName "Nagios Access"
    AuthType Basic
    AuthUserFile /usr/local/nagios/etc/htpasswd.users
    Require valid-user
</Directory>
Is the above correct for nagios 3.0.2? I'm used to nagios 2 where the above
is listed in the documentation. I presume that with nagios 3, this is not
required(?)
(but in any case, I put it in)

 I also try running the cgis from command line,
both statusmap.cgi and trends.cgi produce:
  cannot execute binary file

(by contrast status.cgi produces the message about
guessing that you're running this from the command line
and need a GET or POST).

Apache error logs shows premature end of script headers



What do I need to do?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080814/44a6c11f/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
-------------- next part --------------
_______________________________________________
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