Can't acces Nagios web interface

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Can't acces Nagios web interface

Post 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>
Be sure to check out our Knowledgebase for helpful articles and solutions!
Yurian00
Posts: 13
Joined: Mon Dec 09, 2013 5:53 am

Re: Can't acces Nagios web interface

Post 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.
Yurian00
Posts: 13
Joined: Mon Dec 09, 2013 5:53 am

Re: Can't acces Nagios web interface

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Can't acces Nagios web interface

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Yurian00
Posts: 13
Joined: Mon Dec 09, 2013 5:53 am

Re: Can't acces Nagios web interface

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Can't acces Nagios web interface

Post by abrist »

Well that log is essentially empty. Can you curl the nagios url?

Code: Select all

http://localhost/nagios
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Yurian00
Posts: 13
Joined: Mon Dec 09, 2013 5:53 am

Re: Can't acces Nagios web interface

Post 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>
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Can't acces Nagios web interface

Post by abrist »

Yurian00 wrote:An this one is the result pointing to the IP address:
Were you prompted for a username and password?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Yurian00
Posts: 13
Joined: Mon Dec 09, 2013 5:53 am

Re: Can't acces Nagios web interface

Post by Yurian00 »

NO, just received this message.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Can't acces Nagios web interface

Post by abrist »

Clear the browser cache and then close your browser and reopen it.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked