The basic installation is complete and now configures Apacheso that it can be accessed using the Web interface
Vim/usr/local/apache2/conf/httpd.conf
# Add a row
Include conf/extra/nagios.conf
# Modify and group
User Nagios
Group Nagios
then create the nagios.conf file
Vim/usr/local/apache2/conf/extra/nagios.conf
# Add Content
#setting for Nagios
scriptalias/nagios/cgi-bin/"/usr/local/nagios/sbin/"
# Notice The difference between /usr/local/nagios/sbin/ and /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
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
Require Valid-user
</Directory>
/USR/LOCAL/APACHE2/BIN/HTPASSWD-C/USR/LOCAL/NAGIOS/ETC/HTPASSWD Nagiosadmin # Create a user for background access to Nagios
/usr/local/apache2/bin/apachectl start
/etc/init.d/nagios start
http://192.168.134.141/nagios/# Access nagios via IP
This article is from the "11736718" blog, please be sure to keep this source http://11746718.blog.51cto.com/11736718/1876240
Nagios Loading information in Apache