Page 2 of 3

Re: Can't acces Nagios web interface

Posted: Mon Dec 09, 2013 1:15 pm
by lmiltchev
It seems like you are missing a line in the "/etc/httpd/conf.d/nagios.conf" (in red)
<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>

Re: Can't acces Nagios web interface

Posted: Tue Dec 10, 2013 2:30 am
by Yurian00
lmiltchev I check again the file and I have this line, I think that I lost it during copying the text.

Abris, I've tried but it still being the same. I obtain a time out few seconds after.

Regards.

Re: Can't acces Nagios web interface

Posted: Tue Dec 10, 2013 3:58 am
by Yurian00
In addition.

If I try to access the default web page "http://xxx.xxx.xxx.xxx" I obtain the same results so maybe it is related with Apache.

Re: Can't acces Nagios web interface

Posted: Tue Dec 10, 2013 11:01 am
by abrist
Restart apache and try to browse to the nagios server's webpage again:

Code: Select all

service httpd restart
Additionally, post a tail of the apache error log:

Code: Select all

tail -25 /var/log/httpd/error_Log

Re: Can't acces Nagios web interface

Posted: Tue Dec 10, 2013 11:44 am
by Yurian00
I still can't access.

This is the log:

[Mon Dec 09 19:09:20 2013] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Mon Dec 09 19:09:20 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Dec 09 19:09:20 2013] [notice] Digest: generating secret for digest authentication ...
[Mon Dec 09 19:09:20 2013] [notice] Digest: done
[Mon Dec 09 19:09:20 2013] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips mod_wsgi/3.2 Python/2.6.6 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Tue Dec 10 08:16:14 2013] [notice] caught SIGTERM, shutting down
[Tue Dec 10 08:16:48 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Dec 10 08:16:48 2013] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 10 08:16:48 2013] [notice] Digest: done
[Tue Dec 10 08:16:49 2013] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips mod_wsgi/3.2 Python/2.6.6 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Tue Dec 10 10:05:41 2013] [notice] caught SIGTERM, shutting down
[Tue Dec 10 10:05:47 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Dec 10 10:05:47 2013] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 10 10:05:47 2013] [notice] Digest: done
[Tue Dec 10 10:05:47 2013] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips mod_wsgi/3.2 Python/2.6.6 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Tue Dec 10 10:25:55 2013] [notice] caught SIGTERM, shutting down
[Tue Dec 10 10:26:29 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Dec 10 10:26:29 2013] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 10 10:26:29 2013] [notice] Digest: done
[Tue Dec 10 10:26:30 2013] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips mod_wsgi/3.2 Python/2.6.6 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Tue Dec 10 17:29:58 2013] [notice] caught SIGTERM, shutting down
[Tue Dec 10 17:30:04 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Dec 10 17:30:04 2013] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 10 17:30:04 2013] [notice] Digest: done
[Tue Dec 10 17:30:04 2013] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips mod_wsgi/3.2 Python/2.6.6 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations

Re: Can't acces Nagios web interface

Posted: Tue Dec 10, 2013 12:03 pm
by abrist
Well that log is essentially empty. Can you curl the nagios url?

Code: Select all

http://localhost/nagios

Re: Can't acces Nagios web interface

Posted: Wed Dec 11, 2013 2:41 am
by Yurian00
This is the result:

]# curl http://localhost/nagios
curl: (7) couldn't connect to host



An this one is the result pointing to the IP address:

# curl http://XXX.XXX.XXX.XXX/nagios
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Authorization Required</title>
</head><body>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
<hr>
<address>Apache/2.2.15 (CentOS) Server at XXX.XXX.XXX.XXX Port 80</address>
</body></html>

Re: Can't acces Nagios web interface

Posted: Wed Dec 11, 2013 11:18 am
by abrist
Yurian00 wrote:An this one is the result pointing to the IP address:
Were you prompted for a username and password?

Re: Can't acces Nagios web interface

Posted: Wed Dec 11, 2013 11:20 am
by Yurian00
NO, just received this message.

Re: Can't acces Nagios web interface

Posted: Wed Dec 11, 2013 11:36 am
by abrist
Clear the browser cache and then close your browser and reopen it.