NagiosHow to modify Apache? Install the Apache service first. After the installation is complete, modify the apache configuration file, add the nagios directory, and access this directory requires authentication. (Note: If you do not need to set authentication, comment out the "bold font" section added at the end of httpd. conf)
Vi/usr/local/apache/conf/httpd. conf
- #======================= Nagios Suport =========================#
-
- 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.zhaohang
-
- # AuthUserFile /usr/local/nagios/etc/htpasswd.admin
-
- 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.zhaohang
-
- # AuthUserFile /usr/local/nagios/etc/htpasswd.admin
-
- Require valid-user
-
- </Directory>
-
- #======================= Nagios Suport =========================#
Add a verified user: when accessing nagios through the web, you must use this user to log on. Sometimes, to refresh monitoring for a long time, you do not need to add a password when entering the password. red lines can meet the requirements. user: zhaohang password: 123456
/Usr/local/apache/bin/htpasswd-c/usr/local/nagios/etc/htpasswd. zhaohang
#/Usr/local/apache/bin/htpasswd-c/usr/local/nagios/etc/htpasswd. admin
View the authentication file content:
Less/usr/local/nagios/etc/htpasswd. zhaohang
Test: the First Half of OmWGEsBnoGpIc is the user name test, followed by the encrypted password.
The nagios installation is basically complete now. You can access it through the web. In the http: // 192.168.0.108/nagios/. nagios configuration, we will also introduce
Install and configure nagios, monitor Linux servers, configure initial Nagios 3.0 installation, monitor Windows servers, and solve ten Nagios faults.