Installing problem

Andreas Ericsson ae at op5.se
Fri Sep 29 16:29:18 CEST 2006


Marco Borsani wrote:
> Hi all
>  
> I need to change my nagios server from an HP-UX to a RedHat.
>  
> I install and configure nagios like always, but at the end of all procedures
> I see something strange and Nagios does not run.
>  
> 1) In the /usr/local/nagios/sbin directory some files are absent: 
> histogram.cgi
> statusmap.cgi
> trends.cgi
>  

You didn't have the proper gd libraries and headers installed at the 
time of compiling. I'm not sure where you can find those from HP-UX, but 
for RedHat you *should* get everything needed by the simple expedient of

	yum install gd-devel


> 2) The web interface show the error:
> The server encountered an internal error or misconfiguration and was unable
> to complete your request.
>  
> 3) In the /var/log/httpd/errorlog_log I see:
> [Fri Sep 29 15:56:35 2006] [error] [client 151.X.X.X] (13)Permission denied:
> exec of '/usr/local/nagios/sbin/status.cgi' failed, referer:
> <http://nagios-cl1.it.net/side.html> http://nagios-cl1.it.net/side.html
> [Fri Sep 29 15:56:35 2006] [error] [client 151.X.X.X] Premature end of
> script headers: status.cgi, referer:  <http://nagios-cl1.it.net/side.html>
> http://nagios-cl1.it.net/side.html
>  

The error message tells you exactly what's going wrong.
"Permission denied: exec of '/usr/local/nagios/sbin/status.cgi' failed"

You need to make sure the user apache is running as can execute the 
status.cgi binary. The easiest way to do that is to do like this, 
assuming the apache pseudo-user is called "httpd"

su httpd
cd /usr/local
cd nagios
cd sbin
./status.cgi

The reason for doing it in steps is that you likely have not only faulty 
permissions on the status.cgi program, but somewhere along the path as 
well. Doing it like this will let you see at which points you need to 
modify the permissions in order for httpd to be able to execute the 
program, so just chmod your way there.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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