Page 1 of 1

Availability reports Download Forbidden

Posted: Fri Apr 20, 2018 8:14 am
by rexconsulting
We have a situation on one of our servers where, after clicking Download (any type) of availability report, we get a downloaded file with the only contents reading "Forbidden You don't have permission to access /nagiosxi/reports/availability.php on this server. Additionally, a 403 error was encountered while trying to use an ErrorDocument to handle the request".

Strangely, no corresponding 403 exists in /var/log/httpd/ssl_error_log or /var/log/httpd/error_log.

Attached is an image of what we get if we try downloading a JPG of the report. Same image if we try PDF.

Re: Availability reports Download Forbidden

Posted: Fri Apr 20, 2018 1:10 pm
by tgriep
When downloading a report in Nagios, it uses the External URL setting in the Admin > System Settings menu and if that URL is incorrect, that could cause the issue.

If the server has SSL enabled you should check the /usr/local/nagiosxi/html/config.inc.php file and make sure the following is set to true.

Code: Select all

$cfg['use_https'] = true;
If you change it, you will have to restart apache by running the following as root.

Code: Select all

service httpd restart
If the above is correct, we will have to gather more information / settings from the server.
Can you run the following commands as root on the server.

Code: Select all

chage -l nagios >/tmp/info.txt
chage -l apache >>/tmp/info.txt
ls -lR /usr/local/nagiosxi >>/tmp/info.txt
Then post the following files to the post.

Code: Select all

/tmp/info.txt
/etc/httpd/conf.d/nagiosxi.conf
/etc/httpd/conf.d/ssl.conf
Thanks

Re: Availability reports Download Forbidden

Posted: Fri Apr 20, 2018 2:56 pm
by jjeremydiaz
Can we email you the logs instead?

Re: Availability reports Download Forbidden

Posted: Fri Apr 20, 2018 3:00 pm
by tgriep
Sure, you can Private Message them to me or any of the other Techs.
Click on the User Control Panel link after you have logged in to the Forums, then click on the Private Message tab and fill in the info.

Re: Availability reports Download Forbidden

Posted: Tue Apr 24, 2018 9:35 am
by tgriep
Edit the /etc/httpd/conf.d/nagiosxi.conf file and comment out this line

Code: Select all

SSLRequireSSL
so it looks like this

Code: Select all

#SSLRequireSSL
Save the file and restart Apache by running

Code: Select all

service httpd restart
Then see if you can download the reports.

Re: Availability reports Download Forbidden

Posted: Tue Apr 24, 2018 10:58 am
by rexconsulting
Hi Tom,

We tried the suggested. It did not help.

CP

Re: Availability reports Download Forbidden

Posted: Tue Apr 24, 2018 11:41 am
by tgriep
Are there any other changes that were done to the main Apache config file for SSL?

Code: Select all

/etc/httpd/conf/httpd.conf
Can you login to the XI GUI and go to the Admin > System Settings menu, screen capture it and post the image?

Thanks

Re: Availability reports Download Forbidden

Posted: Tue Apr 24, 2018 12:02 pm
by jjeremydiaz
There are several tabs on the system settings page? Which tabs should we take a screenshot of?

Re: Availability reports Download Forbidden

Posted: Tue Apr 24, 2018 12:23 pm
by tgriep
just the General Tab.