Page 1 of 1

HTTP 500 error

Posted: Tue Dec 13, 2011 8:07 am
by rwaldron
Hi all, I have just installed nagios core 3.3.1.. on Ubuntu server

All looks perfect except when I browse to the home link I get page cannot be dispalyed error HTTP 500 ?
All other links in nagios ae fine !

While installing I ran the command /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

I received an error in nagios.cfg line 465.
This was sorted by creating the 2 directories that were missing
ie:
mkdir /usr/local/nagios/var/spool
mkdir /usr/local/nagios/var/spool/checkresults
chown -R nagios:nagios /usr/local/nagios

So I have no errors now but my home page still has http: 500 error.

Any ideas how to sort this ?
Ray..

Re: HTTP 500 error

Posted: Tue Dec 13, 2011 4:05 pm
by jsmurphy
Hmmm, check /usr/local/nagios/share for permissions problems... they should all belong to the nagios user, also check /usr/local/nagios/sbin

It sounds like it didn't install properly and it might just be easier to recompile it and try again the install again watching carefully for errors.

Re: HTTP 500 error

Posted: Wed Dec 14, 2011 12:36 pm
by rwaldron
I finally got this working (Maps and Homepage ) by downloading the files on a seperate PC and putting them on usb harddisk
Then mount the HD on ubuntu server and copy to server
Then use the quick guide..

The files I was downloading using apt-get must have been corrupt or just not right..


Thx for the reply

Re: HTTP 500 error

Posted: Thu Dec 15, 2011 12:19 pm
by rwaldron
Hiya all,
I got Nagios installed v 3.2.3 without any problems.
When I upgrade to 3.3.1 my home page still gives the HTTP: 500 error..


Is this something to do with the fact that main.html,side.html,index.html are supposed to be replaced by php equivalents and for some reason my update is not changing to php for indes page ?

Ray..

Re: HTTP 500 error

Posted: Thu Dec 15, 2011 4:44 pm
by jsmurphy
You are correct they should be php files... I still think you should go with my original suggestion of compiling from the source... you will probably find it much less painful ;)

http://www.nagios.org/download/core/thanks/
http://nagios.sourceforge.net/docs/3_0/quickstart.html

Re: HTTP 500 error

Posted: Fri Dec 16, 2011 7:35 am
by rwaldron
Hiya js and thx so far for the help.
On a fresh copy of ubuntu server I can install nagios 3.2.3 no problem by following the quick guide here http://nagios.sourceforge.net/docs/3_0/ ... buntu.html

If I do another fresh install of ubuntu server and follow the same quick start guide for 3.3.1 then I get the line 465 error as described in my original post.
This can be fixed by running the appropriate chown and chmod and creating the missing directory /usr/local/nagios/var/spool/checkresults.

But my home page still gives the http: 500 error.

Is there a difinitive install guide for Nagios 3.3.1 as I feel that the quick start guide on the nagios site is missing some steps if you are trying to install v 3.3.1 from source.
or is there an easier way to install 3.3.1 not from source ?

Any more help appretiated or will I just stick with ver 3.2.3 for now ?

Ray..

Re: HTTP 500 error

Posted: Sun Dec 18, 2011 4:37 pm
by jsmurphy
This guide may be a bit better: http://www.unixmen.com/linux-tutorials/ ... 9x-and-10x

Beyond that I'm not sure what else I can suggest, we use SLES, RHEL, CentOS and I've always preferred SuSE to Ubuntu myself as a desktop OS so I'm not particularly familiar with it I'm afraid to know what might be the root cause.

Re: HTTP 500 error

Posted: Sun Dec 18, 2011 5:08 pm
by crfriend
In cases where 500-series errors are being returned from the web-server, the web-server logs are usually indespensible for identifying what went bang. Frequently they not only point to the script that failled but sometimes to the exact line, especially if one is using perl or other interpreted scripts.