nagios安裝后默認的訪問方式為http://IP/nagios
成都網(wǎng)站建設哪家好,找創(chuàng)新互聯(lián)公司!專注于網(wǎng)頁設計、成都網(wǎng)站建設、微信開發(fā)、小程序制作、集團成都定制網(wǎng)站等服務項目。核心團隊均擁有互聯(lián)網(wǎng)行業(yè)多年經(jīng)驗,服務眾多知名企業(yè)客戶;涵蓋的客戶類型包括:成都混凝土攪拌罐車等眾多領(lǐng)域,積累了大量豐富的經(jīng)驗,同時也獲得了客戶的一致贊許!
如果部署在公網(wǎng)訪問,很不方便,需要為其配置下域名。
1、開啟httpd.conf 的module_cgi 的加載
很多時候進入nagios頁面點擊組查看,服務查看,發(fā)現(xiàn)cgi文件直接被下載,而不是被解析。
需要apache開啟cgi文件的解析
LoadModule cgi_module modules/mod_cgi.so
2、apache的配置文件
ServerAdmin admin@abc.com DocumentRoot "/usr/local/nagios/share" ServerName gm.XXXX.com DirectoryIndex index.php # nagios-config ScriptAlias /nagios/cgi-bin "/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"# 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 ErrorLog "/var/log/apache/gm.XXXX.com/error.log" CustomLog "/var/log/apache/gm.XXXX.com/access.log" common