Nagiosset up no authentication login
in a production environment, of course we need to set security mechanisms for the Nagios monitoring service to control the security of the server. However, there are no special needs to be ruled out. I recently met a need, specific requirements: direct input Nagios address can access the internal nagios monitoring interface, without identity authentication!!
The operating environment is as follows:
[Email protected] httpd]# Cat/etc/redhat-releasecentos release 6.5 (Final) CentOS release 6.5 (final) [[email protected] H ttpd]# Uname-r2.6.32-431.el6.x86_64[[email protected] httpd]# uname-mx86_64
Apache version:
[Email protected] httpd]# Rpm-qa httpdhttpd-2.2.15-29.el6.centos.x86_64
Nagios Version:
Version 3.5.1
After some tossing and many experiments, finally found to modify the following several parameters can be achieved without identity authentication login, as follows:
First, modify the configuration file
1, Modify the configuration file /usr/local/nagios/etc/cgi.cfg(need to be consistent with their own installation path)
use_authentication=1
Modified to:
use_authentication=0
2, Modify the configuration file /etc/httpd/conf.d/nagios.conf(need to be consistent with their own installation path, can be found through the find command)
The contents of the configuration file after the comment are removed are:
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 >
Comment out the following two lines:
#Require Valid-user
in general, the modification of the above two files is already able to achieve the non-certified landing function, but also can appear new pits, I was here for a long time ...
3. configuration file /etc/httpd/httpd.conf
The error message is as follows:
Forbiddenyou don ' t has permission to access/nagios/on the this server.
I have been in this place for a long time, after some toss to find this parameter:
<directory/> allowoverride None Require all denied #<== access control, was denied </Directory>
Modify this configuration to:
<directory/> allowoverride None Require all granted #<== change denied to granted</directory>
Second, restart the service
to restart the Nagios service:
/etc/init.d/nagios restart
to restart the Apache service:
/ETC/INIT.D/HTTPD restart
After the restart is complete, you can implement the function of no authentication login, direct access, notice to clear the browser cache!!
Nagios set up No authentication login