Page 1 of 1

Undefined index: REMOTE_USER in /usr/local/nagi

Posted: Wed Nov 22, 2017 12:35 am
by llabas
Hi,

A weird error has just developed on my system. It's a newer (< week old) and was working properly before.

Yes, the htpassword has been set.

Code: Select all

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
What's happening is the system is no longer asking for me to authenticate and I'm getting the following in my web logs:

Code: Select all

PHP Notice:  Undefined index: REMOTE_USER in /usr/local/nagios/share/main.php on line 26, referer: http://la1pup00/nagios/
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg shows:

Total Warnings: 0
Total Errors: 0

The config file for apache has:

Code: Select all

   
<IfVersion >= 2.3>
      <RequireAll>
#         Require all granted
        Require ip 127.0.0.1
        Require local
        Require host localhost
        Require host labas.net
        Require host la1pup00.labas.net
        Require ip 76.72.150.36
        Require ip 46.101.25.142
         AuthName "Nagios Access"
         AuthType Basic
         AuthUserFile /usr/local/nagios/etc/htpasswd.users
         Require valid-user
      </RequireAll>
   </IfVersion>
Any ideas?

TTFN

Re: Undefined index: REMOTE_USER in /usr/local/nagi

Posted: Wed Nov 22, 2017 2:47 pm
by kyang
Is this for Nagios XI or Nagios Core?

What version/OS are you using?

Were there any changes you made to Nagios when you noticed authentication stopped working?

Who are you logging in as? nagiosadmin?

Is the Apache service running? status?

Re: Undefined index: REMOTE_USER in /usr/local/nagi

Posted: Wed Nov 22, 2017 4:09 pm
by llabas
Hi,

Nagios XI, no changes were made and Apache was verified as running (ps -aef),

TTFN
Larry

Re: Undefined index: REMOTE_USER in /usr/local/nagi

Posted: Mon Nov 27, 2017 1:18 pm
by kyang
Just to be sure since you're using basic authentication, have you tried clearing your cache on your browser?

After doing that, does that prompt you to log in?