您好,登錄后才能下訂單哦!
基本安裝完成,現在配置apache,讓它可以用web界面訪問
vim /usr/local/apache2/conf/httpd.conf
#添加一行
Include conf/extra/nagios.conf
#修改主和組
User nagios
Group nagios
然后創建nagios.conf文件
vim /usr/local/apache2/conf/extra/nagios.conf
#添加內容
#setting for nagios
ScriptAlias /nagios/cgi-bin/"/usr/local/nagios/sbin/"
#注意/usr/local/nagios/sbin/和/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 #創建一個用戶,用于后臺訪問nagios
/usr/local/apache2/bin/apachectl start
/etc/init.d/nagios start
http://192.168.134.141/nagios/ #通過ip訪問nagios
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。