您好,登錄后才能下訂單哦!
nagios安裝后默認的訪問方式為http://IP/nagios
如果部署在公網訪問,很不方便,需要為其配置下域名。
1、開啟httpd.conf 的module_cgi 的加載
很多時候進入nagios頁面點擊組查看,服務查看,發現cgi文件直接被下載,而不是被解析。
需要apache開啟cgi文件的解析
LoadModule cgi_module modules/mod_cgi.so
2、apache的配置文件
<VirtualHost *:80> 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" <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.users 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.users Require valid-user </Directory> ErrorLog "/var/log/apache/gm.XXXX.com/error.log" CustomLog "/var/log/apache/gm.XXXX.com/access.log" common </VirtualHost>
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。