Migration from CentOS 5 to 7 issue with /nagiosxi/login.php

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
BenCowan
Posts: 86
Joined: Thu Jul 28, 2011 11:34 am

Migration from CentOS 5 to 7 issue with /nagiosxi/login.php

Post by BenCowan »

I'm hacking my way through trying to migrate my NagiosXI setup in production on CentOS 5.8 over
to a test server running CentOS 7.1.1. It's running okay, but after the migration, I can only get
into the Nagios interface, the XI interface gives me a 403 Forbidden, but I'm not sure why:

You don't have permission to access /nagiosxi/ on this server.

It was working fine right after a fresh intsall.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Migration from CentOS 5 to 7 issue with /nagiosxi/login.

Post by jdalrymple »

What does your /etc/httpd/conf.d/nagiosxi.conf look like. Here is a working one on 7.0:

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>

Alias /nagiosxi "/usr/local/nagiosxi/html"
Apache configurations changed in 7.x
BenCowan
Posts: 86
Joined: Thu Jul 28, 2011 11:34 am

Re: Migration from CentOS 5 to 7 issue with /nagiosxi/login.

Post by BenCowan »

I compared to mine and it looked the same except for, I did not have
this line:

Require all granted

I tried adding that and restarting httpd. I just get a blanks page now.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Migration from CentOS 5 to 7 issue with /nagiosxi/login.

Post by jolson »

Are any errors cropping up in your httpd error log?

Code: Select all

cat /var/log/httpd/error_log
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Migration from CentOS 5 to 7 issue with /nagiosxi/login.

Post by jdalrymple »

BenCowan wrote:Require all granted
That would be the big change going to Apache 2.4 - obviously you're still not out of the woods though.

Does the tail of /var/log/httpd/access_log and/or /var/log/httpd/error_log offer any useful information - I expect you are having some php errors if you're getting a blank page.
BenCowan
Posts: 86
Joined: Thu Jul 28, 2011 11:34 am

Re: Migration from CentOS 5 to 7 issue with /nagiosxi/login.

Post by BenCowan »

Found these errors in the log:
[Thu May 07 16:32:49.291124 2015] [:error] [pid 15002] [client ???.???.???.???:64253] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
[Thu May 07 16:32:49.291219 2015] [:error] [pid 15002] [client ???.???.???.???:64253] PHP Fatal error: Unknown: Failed opening required '/usr/local/nagiosxi/html/login.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0

I renamed /etc/httpd/conf.d/php.conf and replaced with a copy from my centos 5.8 system. This allowed me to get into the
NagiosXI interface, so this issue is resolved I believe. Now I see this:

System Status Degraded!
One or more critical components of Nagios XI has been stopped, is disabled, or has malfunctioned. This can cause problems with monitoring, notifications, reporting, and more. You should investigate this problem immediately.

but this is a different hurdle..., Thanks for the help everybody.
Locked