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
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?