基本安裝完成,現(xiàn)在配置apache,讓它可以用web界面訪問
在柳州等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強(qiáng)發(fā)展的系統(tǒng)性、市場前瞻性、產(chǎn)品創(chuàng)新能力,以專注、極致的服務(wù)理念,為客戶提供做網(wǎng)站、網(wǎng)站制作 網(wǎng)站設(shè)計(jì)制作按需定制,公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),成都品牌網(wǎng)站建設(shè),成都全網(wǎng)營銷,外貿(mào)營銷網(wǎng)站建設(shè),柳州網(wǎng)站建設(shè)費(fèi)用合理。
vim /usr/local/apache2/conf/httpd.conf
#添加一行
Include conf/extra/nagios.conf
#修改主和組
User nagios
Group nagios
然后創(chuàng)建nagios.conf文件
vim /usr/local/apache2/conf/extra/nagios.conf
#添加內(nèi)容
#setting for nagios
ScriptAlias /nagios/cgi-bin/"/usr/local/nagios/sbin/"
#注意/usr/local/nagios/sbin/和/usr/local/nagios/sbin的區(qū)別
# 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
Alias /nagios "/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
/usr/local/apache2/bin/htpasswd -c/usr/local/nagios/etc/htpasswd nagiosadmin #創(chuàng)建一個(gè)用戶,用于后臺(tái)訪問nagios
/usr/local/apache2/bin/apachectl start
/etc/init.d/nagios start
http://192.168.134.141/nagios/ #通過ip訪問nagios