Results 1 to 24 of 24
  1. #1
    Join Date
    Oct 2003
    Location
    Manchester, UK
    Posts
    108

    At my wits end with nagios

    Hey,

    Im installing nagios using the rpm found on there website (v1.2).

    Stupidly, nagios web interface via rpm is only set to allow connections via the local host.

    So I have changed the httpd.conf to allow connections, only problem is.

    Whenever I go on a nagios cgi page I get a error in the error_log

    [Mon Mar 29 17:42:36 2004] [error] [client 217.137.132.60] Premature end of script headers: /usr/lib/nagios/cgi/status.cgi
    The httpd.conf file contains this...

    ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi/
    <Directory /usr/lib/nagios/cgi/>
    AllowOverride AuthConfig
    Options ExecCGI
    order deny,allow
    allow from all
    </Directory>

    Alias /nagios/ /usr/share/nagios/
    <Directory /usr/share/nagios/>
    Options None
    order deny,allow
    allow from all
    </Directory>
    Now the html loads fine, but I get a 500 error on cgi files. And the error above in the error_log file.

    Just for reference, the files run fine using ./avail.cgi for example.

  2. #2
    If you get fed up trying to get it working, or feel it is just wasting your time, support resort will install it for $15:
    http://www.supportresort.com/serveradmin.html


  3. #3
    Join Date
    Dec 2002
    Location
    Egypt
    Posts
    151

    CGI permissions

    Hi aexiHOSTING,

    For these CGI errors check the following.

    1 - chmod 755 /usr/local/nagios/sbin (nagios sbin directory)
    2 - cat /var/log/httpd/suexec_log (see what errors you get)
    3 - I got an error once there and just had to change the owner of the files to be 'nagios' and of course the same for the group.

    wish you luck with your installation.
    knowledge is Power , Spread it.
    www.e-tutankhamun.com
    [email protected]
    AIM:AhmedFouad0 , yahooID:xor2004

  4. #4
    Join Date
    Jul 2001
    Posts
    889
    Just install it from source.

    If you can read & follow directions, it will work. I've done it successfully a few times

  5. #5
    Join Date
    Dec 2003
    Location
    Brisbane, Queensland, Australia
    Posts
    547
    yes the best way to install nagios is to use the source & compile it on the machine.

  6. #6
    Join Date
    Oct 2003
    Location
    Manchester, UK
    Posts
    108
    Tried doing it that way, but I got a different error.

    So either way, its the same thing.

  7. #7
    Join Date
    Dec 2003
    Location
    Brisbane, Queensland, Australia
    Posts
    547
    What specific error did you get?

  8. #8
    Join Date
    Oct 2003
    Location
    Manchester, UK
    Posts
    108
    Got an unrecognised character error using the source compile, and premature end of headers using the rpm.

    Rpm seems the best way, as I know that is a fixable error.

    Just not sure if anyone else has had the same problem.

  9. #9
    Join Date
    Jul 2001
    Posts
    889
    You check error logs for apache?

    You try redownloading the package?

    Error 500 is one of those errors where it can be a lot of things.... check the logs for more info.

  10. #10
    Join Date
    Oct 2003
    Location
    Manchester, UK
    Posts
    108
    Answer is yes to both of the above.

    The error log, is at the top (first post)

  11. #11
    I got this error running mine:

    [Tue Mar 30 09:17:51 2004] [error] [client 66.44.xx.xxx] Premature end of script headers: /usr/local/nagios/sbin/statusmap.cgi

    It's the same for all the cgi scripts
    ^_^

  12. #12
    Join Date
    Oct 2003
    Location
    Manchester, UK
    Posts
    108
    yup, same here

  13. #13
    Join Date
    Oct 2003
    Location
    Manchester, UK
    Posts
    108
    If you get it fixed, let me know how

  14. #14
    Originally posted by aexiHOSTING
    If you get it fixed, let me know how
    Sure

    Same for you I was thinking if maybe this is the problem? http://mtxis.net/nagios/docs/cgiauth.html
    ^_^

  15. #15
    I just got this idea, did you configured the Script to act as user nagios and group apache?

    I'll reinstall everything now with that and see if it works.
    ^_^

  16. #16
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    428
    Why not try to compile it from source? It is not too hard, you run basically a configure, then make make all make install, etc... Sets it all up for you. The docs are really clear about it also:

    http://nagios.sourceforge.net/docs/1_0/installing.html

    I bet the error has to do with ownership. Try fiddling with the file ownerships and test nagios.nagios.

    HTH
    Hostito, Inc. - Web Hosting & Reseller Plans
    http://www.hostito.com
    [email protected] - 1 888 467 8486

  17. #17
    Join Date
    Oct 2003
    Location
    Manchester, UK
    Posts
    108
    If you had read the entire thead, you would know we already tried all of the above.

    A compile from source, just gives you a unrecognised character error.

    I will start changing the users and stuff now.

  18. #18
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    428
    woops sorry about that
    Hostito, Inc. - Web Hosting & Reseller Plans
    http://www.hostito.com
    [email protected] - 1 888 467 8486

  19. #19
    Join Date
    Oct 2003
    Location
    Manchester, UK
    Posts
    108
    No Worries Hostito, I've given up with the stupid rpm.

    Moving back to source now, lets see what error we get this time.

    *Sighs*

  20. #20
    Join Date
    Oct 2003
    Location
    Manchester, UK
    Posts
    108
    Right, I installed from source and am having the exact same error.

    *crys*

  21. #21
    Originally posted by aexiHOSTING
    Right, I installed from source and am having the exact same error.

    *crys*
    Hmm, can't get installed, odd... can someone throw me the config files to test if that is the problem?

    Thanks
    ^_^

  22. #22
    Join Date
    Dec 2003
    Location
    Brisbane, Queensland, Australia
    Posts
    547
    What is the exact statement that during compiling the error is in.

    This will allows us to nail down the problem.

  23. #23
    Join Date
    Oct 2003
    Location
    Manchester, UK
    Posts
    108
    There is no error during compile, the error is cgi. As a posted in the first post.

  24. #24
    Do you have suexec turned on for this virutal host (user&group directives) or is your entire web server running as the nagios user?
    If suexec, Have you checked your suexec log? theres a lot of requirements about permissions that you need to meet to use suexec on cgis. I'll go into more if you are actually using it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •