View previous topic :: View next topic |
Author |
Message |
maiku Guru
Joined: 24 Mar 2004 Posts: 583 Location: Escaping from NY
|
Posted: Sun Mar 15, 2015 12:51 am Post subject: [so] Nagios won't execute CGI but has me download it instead |
|
|
I installed Nagios via this article:
http://wiki.gentoo.org/wiki/Nagios
And now every time I go to click on a menu item on the /nagios page, it asks me to download the .cgi script instead of executing it. What could I be missing in the install? _________________ Michael
Last edited by maiku on Fri Apr 03, 2015 2:55 am; edited 3 times in total |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3146
|
Posted: Sun Mar 15, 2015 9:39 am Post subject: |
|
|
I suppose whatever http server you have installed with nagios has cgi module disabled |
|
Back to top |
|
|
maiku Guru
Joined: 24 Mar 2004 Posts: 583 Location: Escaping from NY
|
Posted: Sun Mar 15, 2015 8:21 pm Post subject: |
|
|
I thought so too, but I tested CGI execution. Plus my /etc/conf.d/apache2 says: Quote: | APACHE2_OPTS="-D INFO -D LANGUAGE -D SSL -D SUEXEC -D PHP -D PERL -D PHP5 -D DAV -D NAGIOS" | So there is definitely something else gone wrong! _________________ Michael |
|
Back to top |
|
|
e3k Guru
Joined: 01 Oct 2007 Posts: 513 Location: Inner Space
|
Posted: Sun Mar 15, 2015 9:02 pm Post subject: |
|
|
maiku wrote: | I thought so too, but I tested CGI execution. Plus my /etc/conf.d/apache2 says: Quote: | APACHE2_OPTS="-D INFO -D LANGUAGE -D SSL -D SUEXEC -D PHP -D PERL -D PHP5 -D DAV -D NAGIOS" | So there is definitely something else gone wrong! |
please check if your apache user is in the nagcmd group. _________________
Flux & Contemplation - Portrait of an Artist in Isolation
|
|
Back to top |
|
|
maiku Guru
Joined: 24 Mar 2004 Posts: 583 Location: Escaping from NY
|
Posted: Mon Mar 16, 2015 2:57 am Post subject: |
|
|
Thanks for the reply. I don't have a nagcmd group, but the user nagios is a part of the group apache and vice versa:
/etc/group Quote: | apache:x:81:nagios
nagios:x:1002:apache | But it still doesn't execute the CGI. _________________ Michael |
|
Back to top |
|
|
e3k Guru
Joined: 01 Oct 2007 Posts: 513 Location: Inner Space
|
Posted: Mon Mar 16, 2015 9:29 am Post subject: |
|
|
maiku wrote: | Thanks for the reply. I don't have a nagcmd group, but the user nagios is a part of the group apache and vice versa:
/etc/group Quote: | apache:x:81:nagios
nagios:x:1002:apache | But it still doesn't execute the CGI. |
could you please print here the ls -l of the CGIs? _________________
Flux & Contemplation - Portrait of an Artist in Isolation
|
|
Back to top |
|
|
maiku Guru
Joined: 24 Mar 2004 Posts: 583 Location: Escaping from NY
|
Posted: Tue Mar 17, 2015 2:57 pm Post subject: |
|
|
e3k wrote: | could you please print here the ls -l of the CGIs? | Do you mean this? Quote: | # ls -l /usr/lib64/nagios/cgi-bin/
total 4192
-rwxr-xr-x 1 root root 297512 Mar 13 22:02 avail.cgi
-rwxr-xr-x 1 root root 296112 Mar 13 22:02 cmd.cgi
-rwxr-xr-x 1 root root 268768 Mar 13 22:02 config.cgi
-rwxr-xr-x 1 root root 309768 Mar 13 22:02 extinfo.cgi
-rwxr-xr-x 1 root root 260760 Mar 13 22:02 histogram.cgi
-rwxr-xr-x 1 root root 240144 Mar 13 22:02 history.cgi
-rwxr-xr-x 1 root root 236032 Mar 13 22:02 notifications.cgi
-rwxr-xr-x 1 root root 231896 Mar 13 22:02 outages.cgi
-rwxr-xr-x 1 root root 231912 Mar 13 22:02 showlog.cgi
-rwxr-xr-x 1 root root 309792 Mar 13 22:02 status.cgi
-rwxr-xr-x 1 root root 256728 Mar 13 22:02 statusmap.cgi
-rwxr-xr-x 1 root root 252456 Mar 13 22:02 statuswml.cgi
-rwxr-xr-x 1 root root 236040 Mar 13 22:02 statuswrl.cgi
-rwxr-xr-x 1 root root 260656 Mar 13 22:02 summary.cgi
-rwxr-xr-x 1 root root 248368 Mar 13 22:02 tac.cgi
-rwxr-xr-x 1 root root 264864 Mar 13 22:02 trends.cgi |
_________________ Michael |
|
Back to top |
|
|
e3k Guru
Joined: 01 Oct 2007 Posts: 513 Location: Inner Space
|
Posted: Tue Mar 17, 2015 6:07 pm Post subject: |
|
|
maiku wrote: | e3k wrote: | could you please print here the ls -l of the CGIs? | Do you mean this? Quote: | # ls -l /usr/lib64/nagios/cgi-bin/
total 4192
-rwxr-xr-x 1 root root 297512 Mar 13 22:02 avail.cgi
-rwxr-xr-x 1 root root 296112 Mar 13 22:02 cmd.cgi
-rwxr-xr-x 1 root root 268768 Mar 13 22:02 config.cgi
-rwxr-xr-x 1 root root 309768 Mar 13 22:02 extinfo.cgi
-rwxr-xr-x 1 root root 260760 Mar 13 22:02 histogram.cgi
-rwxr-xr-x 1 root root 240144 Mar 13 22:02 history.cgi
-rwxr-xr-x 1 root root 236032 Mar 13 22:02 notifications.cgi
-rwxr-xr-x 1 root root 231896 Mar 13 22:02 outages.cgi
-rwxr-xr-x 1 root root 231912 Mar 13 22:02 showlog.cgi
-rwxr-xr-x 1 root root 309792 Mar 13 22:02 status.cgi
-rwxr-xr-x 1 root root 256728 Mar 13 22:02 statusmap.cgi
-rwxr-xr-x 1 root root 252456 Mar 13 22:02 statuswml.cgi
-rwxr-xr-x 1 root root 236040 Mar 13 22:02 statuswrl.cgi
-rwxr-xr-x 1 root root 260656 Mar 13 22:02 summary.cgi
-rwxr-xr-x 1 root root 248368 Mar 13 22:02 tac.cgi
-rwxr-xr-x 1 root root 264864 Mar 13 22:02 trends.cgi |
|
others have rx seems fine for me.. next i would check the nagios/apache config file maybe the path here: http://nagiosbook.org/html/ch05s03.html is the same on gentoo. _________________
Flux & Contemplation - Portrait of an Artist in Isolation
|
|
Back to top |
|
|
maiku Guru
Joined: 24 Mar 2004 Posts: 583 Location: Escaping from NY
|
Posted: Wed Apr 01, 2015 7:55 pm Post subject: |
|
|
The config file seems okay: Quote: | <IfDefine NAGIOS>
ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi-bin/
<Directory "/usr/lib/nagios/cgi-bin/">
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
Alias /nagios /usr/share/nagios/htdocs
<Directory "/usr/share/nagios/htdocs">
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
</IfDefine> | It is defined as you can see in my /etc/conf.d/apache2: Quote: | APACHE2_OPTS="-D INFO -D LANGUAGE -D SSL -D SUEXEC -D PHP -D PERL -D PHP5 -D DAV -D NAGIOS" |
_________________ Michael |
|
Back to top |
|
|
e3k Guru
Joined: 01 Oct 2007 Posts: 513 Location: Inner Space
|
|
Back to top |
|
|
maiku Guru
Joined: 24 Mar 2004 Posts: 583 Location: Escaping from NY
|
Posted: Fri Apr 03, 2015 2:54 am Post subject: |
|
|
That was it! That fixed it. I had to reinstall apache with CGI support and enable it. Thank you! _________________ Michael |
|
Back to top |
|
|
|