Internal Server Error on Fresh Installation

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.
dwp
Posts: 9
Joined: Mon Jul 01, 2013 12:26 pm

Internal Server Error on Fresh Installation

Post by dwp »

Hi,

I have installed Nagios 3.5.0. on Ubuntu Server 12.04 correctly,
using the instructions on this link: http://nagios.sourceforge.net/docs/3_0/ ... buntu.html

I can enter at Home of Nagios perfectly after installation,
but... if I do click on links of left-menu (For example, sections like 'Tactical Overview'), the Nagios page says:

---
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
---

NOTE1:
with command:
# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios says -- 0 ERRORS --

NOTE2:
Selinux is disabled

NOTE3:
The htpasswd.users are created correctly

¿Possible Solutions Please? :S

Thanks in advance!


Bye,
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Internal Server Error on Fresh Installation

Post by abrist »

Is the nagios process running?

Code: Select all

service nagios status
Have you configured cgi authentication?
http://nagios.sourceforge.net/docs/3_0/cgiauth.html
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.
dwp
Posts: 9
Joined: Mon Jul 01, 2013 12:26 pm

Re: Internal Server Error on Fresh Installation

Post by dwp »

abrist wrote:Is the nagios process running?

Code: Select all

service nagios status
Have you configured cgi authentication?
http://nagios.sourceforge.net/docs/3_0/cgiauth.html

Code: Select all

service nagios status
nagios (pid 17729) is running...
On /usr/local/nagios/etc/cgi.cfg

Code: Select all

use_authentication=1
use_ssl_authentication=0
what else I can try?

Thanks in advance!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Internal Server Error on Fresh Installation

Post by abrist »

Any errors in your httpd/apache error/access logs?
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.
dwp
Posts: 9
Joined: Mon Jul 01, 2013 12:26 pm

Re: Internal Server Error on Fresh Installation

Post by dwp »

abrist wrote:Any errors in your httpd/apache error/access logs?
With command: tail -f /var/log/apache2/error.log
None errors today for Nagios :S

Other possibles ideas?

Thanks you!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Internal Server Error on Fresh Installation

Post by abrist »

How about the access 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.
dwp
Posts: 9
Joined: Mon Jul 01, 2013 12:26 pm

Re: Internal Server Error on Fresh Installation

Post by dwp »

abrist wrote:How about the access log?

Code: Select all

root@machine:~# tail -f /var/log/apache2/access.log
127.0.0.1 - - [02/Jul/2013:12:03:29 +0200] "GET / HTTP/1.0" 200 462 "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"
127.0.0.1 - - [02/Jul/2013:12:08:29 +0200] "GET / HTTP/1.0" 200 462 "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"
127.0.0.1 - - [02/Jul/2013:12:13:29 +0200] "GET / HTTP/1.0" 200 462 "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"
127.0.0.1 - - [02/Jul/2013:12:18:29 +0200] "GET / HTTP/1.0" 200 462 "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"
127.0.0.1 - - [02/Jul/2013:12:23:29 +0200] "GET / HTTP/1.0" 200 462 "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"
127.0.0.1 - - [02/Jul/2013:12:28:29 +0200] "GET / HTTP/1.0" 200 462 "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"
127.0.0.1 - - [02/Jul/2013:12:33:29 +0200] "GET / HTTP/1.0" 200 462 "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"
127.0.0.1 - - [02/Jul/2013:12:38:29 +0200] "GET / HTTP/1.0" 200 462 "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"
127.0.0.1 - - [02/Jul/2013:12:43:29 +0200] "GET / HTTP/1.0" 200 462 "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"
127.0.0.1 - - [02/Jul/2013:12:48:29 +0200] "GET / HTTP/1.0" 200 462 "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"
:S

¿?¿?

Thanks you.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Internal Server Error on Fresh Installation

Post by lmiltchev »

Can you post the nagios.conf file? I believe in Ubuntu should be in "/etc/apache2/conf.d/".
Be sure to check out our Knowledgebase for helpful articles and solutions!
dwp
Posts: 9
Joined: Mon Jul 01, 2013 12:26 pm

Re: Internal Server Error on Fresh Installation

Post by dwp »

lmiltchev wrote:Can you post the nagios.conf file? I believe in Ubuntu should be in "/etc/apache2/conf.d/".
vim /etc/apache2/conf.d/nagios.conf

Code: Select all


# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
# Last Modified: 11-26-2005
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file.  Customize the paths, etc. as
# needed to fit your system.

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
#  SSLRequireSSL
   Options ExecCGI
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /usr/local/nagios/etc/htpasswd.users
   Require valid-user
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
#  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 Access"
   AuthType Basic
   AuthUserFile /usr/local/nagios/etc/htpasswd.users
   Require valid-user
</Directory>

sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Internal Server Error on Fresh Installation

Post by sreinhardt »

Your config looks great! Lets check permissions on the the cgi files and such then.

Code: Select all

ll /usr/local/nagios/sbin
ll /usr/local/nagios/share
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked