Page 1 of 1

Problem with trends.cgi, statusmap.cgi and Histogram

Posted: Fri Mar 13, 2015 7:20 pm
by Mauusss
Hello,

I have NagiosĀ® Coreā„¢ Version 4.0.8 on a Ubuntu Linux 14.04.1, and everything seems to be working fine, except that when clicking on the links for Trend reports, Histogram and Maps, I get the following error :
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
This is what I have configured in the apache config file: (/etc/apache2/apache2.conf)

Code: Select all

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
#  SSLRequireSSL
   Options ExecCGI
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   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">
#  SSLRequireSSL
   Options None
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /usr/local/nagios/etc/htpasswd.users
   Require valid-user
</Directory>
The cgi files seem to be installed..

Code: Select all

/usr/local/nagios/sbin$ ls
archivejson.cgi  cmd.cgi     extinfo.cgi    history.cgi        objectjson.cgi  showlog.cgi  statusjson.cgi  statuswml.cgi  summary.cgi  trends.cgi
avail.cgi        config.cgi  histogram.cgi  notifications.cgi  outages.cgi     status.cgi   statusmap.cgi   statuswrl.cgi  tac.cgi
The cgi module seems to be loaded in apache: /etc/apache2/mods-enabled/cgi.load

Code: Select all

LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
I Have PHP% installed, and also seems to have the libraries installed..

Code: Select all

 php5 -m | grep -i gd
gd
If any of you have any idea on what could be the problem.. I would really appreciated.

Thank you...

Re: Problem with trends.cgi, statusmap.cgi and Histogram

Posted: Sun Mar 15, 2015 10:21 pm
by Box293
This might have to do with a couple of things:

SELinux could be enabled
Some Apache settings

Here's a guide I wrote for Core on Ubuntu, it might have the commands to fix your problem:

http://sites.box293.com/nagios/guides/i ... untu-14-04

Specifically I would try:

Code: Select all

sed -i 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/selinux/config
setenforce 0
Or

did you compile it pointing to the correct apache location?

Code: Select all

./configure --with-nagios-group=nagios --with-command-group=nagcmd --with-mail=/usr/bin/sendmail --with-httpd-conf=/etc/apache2/sites-enabled
And these commands commonly fix problems:

Code: Select all

a2enmod rewrite
a2enmod cgi
service apache2 restart
Let us know how you go.