7月 032014
 

nagios-path

nagios-web-url

修改
[root@monitor share]# pwd
/usr/local/nagios/share
[root@monitor share]# vi config.inc.php

//$cfg[‘cgi_base_url’]=’/nagios/cgi-bin’;
$cfg[‘cgi_base_url’]=’/monitor2/cgi-bin’;

修改
[root@monitor etc]# pwd
/usr/local/nagios/etc
[root@monitor etc]# vi cgi.cfg
# URL HTML PATH
# This is the path portion of the URL that corresponds to the
# physical location of the Nagios HTML files (as defined above).
# This value is used by the CGIs to locate the online documentation
# and graphics. If you access the Nagios pages with an URL like
# http://www.myhost.com/nagios, this value should be ‘/nagios’
# (without the quotes).

#url_html_path=/nagios
url_html_path=/monitor2

修改
[root@monitor conf.d]# pwd
/etc/httpd/conf.d
[root@monitor conf.d]# vi nagios.conf

#ScriptAlias /nagios/cgi-bin “/usr/local/nagios/sbin”
ScriptAlias /monitor2/cgi-bin “/usr/local/nagios/sbin”

#Alias /nagios “/usr/local/nagios/share”
Alias /monitor2 “/usr/local/nagios/share”

重启
[root@monitor share]# service nagios restart
Running configuration check…done.
Stopping nagios: done.
Starting nagios:This account is currently not available.
done.
[root@monitor share]#

[root@monitor etc]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@monitor etc]#