nagiosxi page access denied after update to 5.8.5

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
clayye
Posts: 17
Joined: Mon Apr 06, 2015 5:27 pm

nagiosxi page access denied after update to 5.8.5

Post 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)
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: nagiosxi page access denied after update to 5.8.5

Post 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
clayye
Posts: 17
Joined: Mon Apr 06, 2015 5:27 pm

Re: nagiosxi page access denied after update to 5.8.5

Post by clayye »

please see attached.

we didn't go from el6 to el7, the nagios was always running el7.
You do not have the required permissions to view the files attached to this post.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: nagiosxi page access denied after update to 5.8.5

Post 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
clayye
Posts: 17
Joined: Mon Apr 06, 2015 5:27 pm

Re: nagiosxi page access denied after update to 5.8.5

Post by clayye »

thanks, works now after this config change.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: nagiosxi page access denied after update to 5.8.5

Post by vtrac »

Great!! .... locking thread ... :-)
Locked