I have a brand new and configured installation of Nagios, everything was working fine and then there was an accidental downing of the server. Now none of the CGI’s are showing. Can someone please point me the correct direction to resolve this issue. relatively new to linux and quite desperate.
Running Centos brand new install and nagios Version 3.0.2.
I am getting the warnings from nagios so I know it is running so it must just be the web configuration became corrupted.
If someone can help there will be a million thank yous.
OK I have Include /etc/httpd/conf.d/nagios.conf
in my httpd.conf and in my nagios.conf I have:
SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
Last Modified: 11-26-2005
This file contains examples of entries that need
to be incorporated into your Apache web server
configuration file. Customize the paths, etc. as
needed to fit your system.
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
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
I beleive that is all correct
ok on checking the apache error log at /etc/httpd/logs/error_log discovered a cgi access error and followed the instructions here
meulie.net/portal_plugins/fo … c.php?1686
to reset the permissions:
chcon -R system_u:object_r:httpd_sys_script_exec_t /usr/local/nagios/sbin
which changes the security context to state that those files exist for web access.