Results 1 to 2 of 2

Thread: Leap 42.1 apache 2.4 nagios 3.5.1 authorization problem

  1. #1

    Question Leap 42.1 apache 2.4 nagios 3.5.1 authorization problem

    Hello
    I have:
    Leap 42.1
    apache 2.4.16
    nagios 3.5.1 from repository.
    I configure and start services: apache2 and nagios. All in systemctl status apache2.service and nagios.service is ok.

    When I go to http://localhost/nagios it's no box for authorization and:

    It appears as though you do not have permission to view information for any of the hosts you requested...
    If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
    and check the authorization options in your CGI configuration file.

    I have:
    /etc/nagios/cgi.cfg
    use_authentication=1
    all authorized_for_ is nagiosadmin

    htpasswd2 -c /etc/nagios/htpasswd.users nagiosadmin

    I change in /etc/apache2/conf.d/nagios.conf Order allow,deny to Require all granted

    Code:
    cat /etc/apache2/conf.d/nagios.conf
    ScriptAlias /nagios/cgi-bin "/usr/lib/nagios/cgi"
    
    <Directory "/usr/lib/nagios/cgi">
    #  SSLRequireSSL
       Options ExecCGI
       AllowOverride None
       <IfVersion >= 2.3>
          <RequireAll>
             Require all granted
             AuthName "Nagios Access"
             AuthType Basic
             AuthUserFile /etc/nagios/htpasswd.users
             Require valid-user
          </RequireAll>
       </IfVersion>
       <IfVersion < 2.3>
          Order allow,deny
          Allow from all
          AuthName "Nagios Access"
          AuthType Basic
             AuthUserFile /etc/nagios/htpasswd.users
          Require valid-user
       </IfVersion>
    </Directory>
    
    Alias /nagios "/usr/share/nagios"
    
    <Directory "/usr/share/nagios">
    #  SSLRequireSSL
       Options None
       AllowOverride None
       <IfVersion >= 2.3>
          <RequireAll>
             Require all granted
             AuthName "Nagios Access"
             AuthType Basic
             AuthUserFile /etc/nagios/htpasswd.users
             Require valid-user
          </RequireAll>
       </IfVersion>
       <IfVersion < 2.3>
          Order allow,deny
          Allow from all
          AuthName "Nagios Access"
          AuthType Basic
             AuthUserFile /etc/nagios/htpasswd.users
          Require valid-user
       </IfVersion>
    </Directory>
    And no authorization. When I change use_authentication=0 then all is ok. I see all service and hosts.
    I try AllowOverride None → AuthConfig and nothing change.

    Is anybody have it working?

  2. #2

    Default Re: Leap 42.1 apache 2.4 nagios 3.5.1 authorization problem

    I found problem
    I have old config old-nagios.conf in /etc/apache2/conf.d and apache2 get old configuration
    Now is OK - i moved old config to different folder

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •