In Nagios 3.0, how does one modify Apache configuration?

Source: Internet
Author: User

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

 
 
  1. #======================= Nagios Suport =========================#  
  2.  
  3. ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"  
  4.  
  5. <Directory "/usr/local/nagios/sbin"> 
  6.  
  7. #  SSLRequireSSL  
  8.  
  9.    Options ExecCGI  
  10.  
  11.    AllowOverride None  
  12.  
  13.    Order allow,deny  
  14.  
  15.    Allow from all  
  16.  
  17. #  Order deny,allow  
  18.  
  19. #  Deny from all  
  20.  
  21. #  Allow from 127.0.0.1  
  22.  
  23.    AuthName "Nagios Access"  
  24.  
  25.    AuthType Basic  
  26.  
  27.    AuthUserFile /usr/local/nagios/etc/htpasswd.zhaohang  
  28.  
  29. #   AuthUserFile /usr/local/nagios/etc/htpasswd.admin  
  30.  
  31.    Require valid-user  
  32.  
  33. </Directory> 
  34.  
  35. Alias /nagios "/usr/local/nagios/share"  
  36.  
  37. <Directory "/usr/local/nagios/share"> 
  38.  
  39. #  SSLRequireSSL  
  40.  
  41.    Options None  
  42.  
  43.    AllowOverride None  
  44.  
  45.    Order allow,deny  
  46.  
  47.    Allow from all  
  48.  
  49. #  Order deny,allow  
  50.  
  51. #  Deny from all  
  52.  
  53. #  Allow from 127.0.0.1  
  54.  
  55.    AuthName "Nagios Access"  
  56.  
  57.    AuthType Basic  
  58.  
  59.    AuthUserFile /usr/local/nagios/etc/htpasswd.zhaohang  
  60.  
  61. #   AuthUserFile /usr/local/nagios/etc/htpasswd.admin  
  62.  
  63.    Require valid-user  
  64.  
  65. </Directory> 
  66.  
  67. #======================= 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.