Page 2 of 2

Re: Internal Server Error on Fresh Installation

Posted: Thu Jul 04, 2013 2:48 am
by dwp
sreinhardt wrote: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
Ok!

Code: Select all

root@machine:~# ll /usr/local/nagios/sbin/
total 3968
drwxrwxr-x. 2 nagios nagios   4096 Jun 26 10:51 ./
drwxr-xr-x  9 root   root     4096 Jun 26 11:05 ../
-rwxrwxr-x. 1 nagios nagios 281296 Jun 26 10:51 avail.cgi*
-rwxrwxrw-. 1 nagios nagios 275792 Jun 26 10:51 cmd.cgi*
-rwxrwxr-x. 1 nagios nagios 248448 Jun 26 10:51 config.cgi*
-rwxrwxr-x. 1 nagios nagios 289456 Jun 26 10:51 extinfo.cgi*
-rwxrwxr-x. 1 nagios nagios 240440 Jun 26 10:51 histogram.cgi*
-rwxrwxr-x. 1 nagios nagios 219824 Jun 26 10:51 history.cgi*
-rwxrwxr-x. 1 nagios nagios 219808 Jun 26 10:51 notifications.cgi*
-rwxrwxr-x. 1 nagios nagios 211576 Jun 26 10:51 outages.cgi*
-rwxrwxr-x. 1 nagios nagios 215688 Jun 26 10:51 showlog.cgi*
-rwxrwxr-x. 1 nagios nagios 289480 Jun 26 10:51 status.cgi*
-rwxrwxr-x. 1 nagios nagios 236408 Jun 26 10:51 statusmap.cgi*
-rwxrwxr-x. 1 nagios nagios 232128 Jun 26 10:51 statuswml.cgi*
-rwxrwxr-x. 1 nagios nagios 215712 Jun 26 10:51 statuswrl.cgi*
-rwxrwxr-x. 1 nagios nagios 240344 Jun 26 10:51 summary.cgi*
-rwxrwxr-x. 1 nagios nagios 232144 Jun 26 10:51 tac.cgi*
-rwxrwxr-x. 1 nagios nagios 248632 Jun 26 10:51 trends.cgi*
root@machine:~# ll /usr/local/nagios/share/
total 80
drwxrwxr-x 11 nagios nagios 4096 Jul  1 20:20 ./
drwxr-xr-x  9 root   root   4096 Jun 26 11:05 ../
-rw-rw-r--  1 nagios nagios  576 Jun 26 10:51 config.inc.php
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 contexthelp/
drwxrwxr-x  3 nagios nagios 4096 Jun 26 10:51 docs/
drwxrwxr-x  3 nagios nagios 4096 Jun 26 10:51 images/
drwxrwxr-x  3 nagios nagios 4096 Jun 26 10:51 includes/
-rw-rw-r--  1 nagios nagios 1608 Jun 26 10:51 index.php
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 js/
drwxr-xr-x  4 root   root   4096 Jun 26 11:05 locale/
-rw-rw-r--  1 nagios nagios 5862 Jun 26 10:51 main.php
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 media/
-rw-rw-r--  1 nagios nagios   26 Jun 26 10:51 robots.txt
-rw-rw-r--  1 nagios nagios  941 Jun 26 10:51 rss-corefeed.php
-rw-rw-r--  1 nagios nagios  995 Jun 26 10:51 rss-newsfeed.php
-rw-rw-r--  1 nagios nagios 5756 Jun 26 10:51 side.php
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 ssi/
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 stylesheets/
root@machine:~# 
Thank you!

Re: Internal Server Error on Fresh Installation

Posted: Mon Jul 08, 2013 4:50 am
by dwp
dwp wrote:
sreinhardt wrote: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
Ok!

Code: Select all

root@machine:~# ll /usr/local/nagios/sbin/
total 3968
drwxrwxr-x. 2 nagios nagios   4096 Jun 26 10:51 ./
drwxr-xr-x  9 root   root     4096 Jun 26 11:05 ../
-rwxrwxr-x. 1 nagios nagios 281296 Jun 26 10:51 avail.cgi*
-rwxrwxrw-. 1 nagios nagios 275792 Jun 26 10:51 cmd.cgi*
-rwxrwxr-x. 1 nagios nagios 248448 Jun 26 10:51 config.cgi*
-rwxrwxr-x. 1 nagios nagios 289456 Jun 26 10:51 extinfo.cgi*
-rwxrwxr-x. 1 nagios nagios 240440 Jun 26 10:51 histogram.cgi*
-rwxrwxr-x. 1 nagios nagios 219824 Jun 26 10:51 history.cgi*
-rwxrwxr-x. 1 nagios nagios 219808 Jun 26 10:51 notifications.cgi*
-rwxrwxr-x. 1 nagios nagios 211576 Jun 26 10:51 outages.cgi*
-rwxrwxr-x. 1 nagios nagios 215688 Jun 26 10:51 showlog.cgi*
-rwxrwxr-x. 1 nagios nagios 289480 Jun 26 10:51 status.cgi*
-rwxrwxr-x. 1 nagios nagios 236408 Jun 26 10:51 statusmap.cgi*
-rwxrwxr-x. 1 nagios nagios 232128 Jun 26 10:51 statuswml.cgi*
-rwxrwxr-x. 1 nagios nagios 215712 Jun 26 10:51 statuswrl.cgi*
-rwxrwxr-x. 1 nagios nagios 240344 Jun 26 10:51 summary.cgi*
-rwxrwxr-x. 1 nagios nagios 232144 Jun 26 10:51 tac.cgi*
-rwxrwxr-x. 1 nagios nagios 248632 Jun 26 10:51 trends.cgi*
root@machine:~# ll /usr/local/nagios/share/
total 80
drwxrwxr-x 11 nagios nagios 4096 Jul  1 20:20 ./
drwxr-xr-x  9 root   root   4096 Jun 26 11:05 ../
-rw-rw-r--  1 nagios nagios  576 Jun 26 10:51 config.inc.php
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 contexthelp/
drwxrwxr-x  3 nagios nagios 4096 Jun 26 10:51 docs/
drwxrwxr-x  3 nagios nagios 4096 Jun 26 10:51 images/
drwxrwxr-x  3 nagios nagios 4096 Jun 26 10:51 includes/
-rw-rw-r--  1 nagios nagios 1608 Jun 26 10:51 index.php
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 js/
drwxr-xr-x  4 root   root   4096 Jun 26 11:05 locale/
-rw-rw-r--  1 nagios nagios 5862 Jun 26 10:51 main.php
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 media/
-rw-rw-r--  1 nagios nagios   26 Jun 26 10:51 robots.txt
-rw-rw-r--  1 nagios nagios  941 Jun 26 10:51 rss-corefeed.php
-rw-rw-r--  1 nagios nagios  995 Jun 26 10:51 rss-newsfeed.php
-rw-rw-r--  1 nagios nagios 5756 Jun 26 10:51 side.php
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 ssi/
drwxrwxr-x  2 nagios nagios 4096 Jun 26 10:51 stylesheets/
root@machine:~# 
Thank you!
no more ideas ? :S
I need solution, please.

Thank you in advance!

Re: Internal Server Error on Fresh Installation

Posted: Mon Jul 08, 2013 2:37 pm
by sreinhardt
Do your files in sbin, actually have *'s after them or is that and oddity of the shell you are using? Otherwise your permissions look great as well. Just to confirm, did you do the tail -f commands while attempting to view pages that error? Let's also check your users and be sure thats ok.

cat /etc/group| grep nag

Re: Internal Server Error on Fresh Installation

Posted: Tue Jul 09, 2013 10:12 am
by dwp
sreinhardt wrote:Do your files in sbin, actually have *'s after them or is that and oddity of the shell you are using? Otherwise your permissions look great as well. Just to confirm, did you do the tail -f commands while attempting to view pages that error? Let's also check your users and be sure thats ok.

cat /etc/group| grep nag
At least in Ubuntu, this *'s means that it is an executable file. This is not oddity. My shell is a simple Bash.

Yes, confirmed, I have done tail -f commands while attempting to view pages that error.

Code: Select all

root@machine:~# cat /etc/group | grep nag
nagios:x:121:nagios
nagcmd:x:1007:www-data
This is very difficult... I thought it Nagios installation would be much easier, really :S

Re: Internal Server Error on Fresh Installation

Posted: Tue Jul 09, 2013 1:37 pm
by sreinhardt
Ah I see, not an ubuntu person myself and other distro's don't seem to include that bit. Let's try adding www-data to the nagios group and restarting apache. At this point I don't believe apache would have access to the nagios files despite being in the nagcmd group.

Code: Select all

usermod -a -G nagios www-data
service apache2 restart
Does it begin to work now?

Re: Internal Server Error on Fresh Installation

Posted: Wed Jul 10, 2013 2:54 am
by dwp
sreinhardt wrote:Ah I see, not an ubuntu person myself and other distro's don't seem to include that bit. Let's try adding www-data to the nagios group and restarting apache. At this point I don't believe apache would have access to the nagios files despite being in the nagcmd group.

Code: Select all

usermod -a -G nagios www-data
service apache2 restart
Does it begin to work now?

Code: Select all

root@machine:~# usermod -a -G nagios www-data
root@machine:~# service apache2 restart
 * Restarting web server apache2
 ... waiting    ...done.
And the error still appears... :S

Re: Internal Server Error on Fresh Installation

Posted: Wed Jul 10, 2013 2:00 pm
by abrist
You really should have some errors in the apache error_log or system messages.