Page 1 of 1

nagiosxi page access denied after update to 5.8.5

Posted: Tue Jul 27, 2021 2:28 pm
by clayye
Hi ,
After I updated nagsioxi from 5.8.4 to to 5.8.5, nagiosxi page showed "Forbidden
You don't have permission to access /nagiosxi/ on this server."

on ssl_error_log , showed errors like:
[Tue Jul 27 19:14:58.580089 2021] [authz_core:error] [pid 61337] [client x.x.x.x:39787] AH01630: client denied by server configuration: /usr/local/nagiosxi/html/ajaxhelper.php, referer: https://nagios.example.com/nagiosxi/inc ... splash.php

how to fix this , thanks?

$ rpm -qa|grep nagios
nagiosxi-wkhtmltox-5.8.5-1.el7.x86_64
nagiosxi-mrtg-5.8.5-1.el7.x86_64
nagiosxi-nxti-5.8.5-1.el7.x86_64
nagiosxi-nagiosql-5-4.13.el7.x86_64
nagiosxi-nagiosmobile-5.6.14-1.el7.x86_64
nagiosxi-ndoutils-5.8.5-1.el7.x86_64
nagiosxi-nagvis-5.8.5-1.el7.x86_64
nagiosxi-ajaxterm-5-4.13.el7.x86_64
nagiosxi-nrpe-5.8.5-1.el7.x86_64
nagiosxi-nrds-5.8.5-1.el7.x86_64
nagiosxi-nagiosplugins-5.8.5-1.el7.x86_64
nagiosxi-5.8.5-1.el7.x86_64
nagiosxi-pnp-5.8.5-1.el7.x86_64
nagios-repo-7-4.el7.noarch
nagiosxi-nsca-5.8.5-1.el7.x86_64
percona-nagios-plugins-1.1.7-2.noarch
nagiosxi-wmic-5.8.5-1.el7.x86_64
nagiosxi-shellinabox-5.8.5-1.el7.x86_64
nagiosxi-nagioscore-5.8.5-1.el7.x86_64

$ cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

Re: nagiosxi page access denied after update to 5.8.5

Posted: Tue Jul 27, 2021 4:37 pm
by ssax
Looks like an apache configuration issue, it may need Require all granted in some location, we'll need your apache configs to debug further.

Did you also go to from EL6 to EL7?

Please run this command as root and send me the resulting /tmp/HTTPDFILES.tar.gz file:

Code: Select all

tar czvf /tmp/HTTPDFILES.tar.gz /etc/httpd/conf/httpd.conf /etc/httpd/conf.d

Re: nagiosxi page access denied after update to 5.8.5

Posted: Tue Jul 27, 2021 9:09 pm
by clayye
please see attached.

we didn't go from el6 to el7, the nagios was always running el7.

Re: nagiosxi page access denied after update to 5.8.5

Posted: Wed Jul 28, 2021 2:17 pm
by vtrac
Hi,
Hope you are having a great Wednesday!! ... :-)

Looks like you are missing the "Require all granted" line in the "/etc/httpd/conf.d/nagiosxi.conf" file.

Please edit the "/etc/httpd/conf.d/nagiosxi.conf" and change:
From:

Code: Select all

<Directory "/usr/local/nagiosxi/html">
#  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 XI"
#   AuthType Basic
#   AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
#   Require valid-user
</Directory>
To:

Code: Select all

<Directory "/usr/local/nagiosxi/html">
#  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 XI"
#   AuthType Basic
#   AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
#   Require valid-user
   Require all granted
</Directory>
Now, please restart httpd and Nagios services:

Code: Select all

systemctl restart httpd
systemctl restart nagios
Best Regards,
Vinh

Re: nagiosxi page access denied after update to 5.8.5

Posted: Thu Jul 29, 2021 1:56 pm
by clayye
thanks, works now after this config change.

Re: nagiosxi page access denied after update to 5.8.5

Posted: Thu Jul 29, 2021 2:19 pm
by vtrac
Great!! .... locking thread ... :-)