CGI Downloading Instead of Executing

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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: CGI Downloading Instead of Executing

Post by slansing »

Let us know what the outcome is, thanks! I'll be digging into seeing if this has occurred recently elsewhere. Was this an upgrade from a 3.x version? Or just a full initial compile of core 4.0.6?
rbalabama
Posts: 8
Joined: Thu May 29, 2014 12:16 pm

Re: CGI Downloading Instead of Executing

Post by rbalabama »

I sorry I missed that before, I went in and put the slashes in and restarted Apache2. Unfortunately it did not resolve the issue. Thanks
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: CGI Downloading Instead of Executing

Post by eloyd »

rbalabama wrote:I sorry I missed that before, I went in and put the slashes in and restarted Apache2. Unfortunately it did not resolve the issue. Thanks
Okay, thank you for trying. I think I need to reread all the comments in this thread to come up with my next suggestion.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: CGI Downloading Instead of Executing

Post by eloyd »

Here is the portion of our httpd.conf that applies to our corporate Nagios server. I've removed information that is not important. This is for Nagios Core 3.4.1, running on Apache 2.2.3 on Centos 6.4, but it should be pretty similar. Can you try to incorporate this into your configuration file and see if any of it helps?

I think you may be missing a key "Options ExecCGI" somewhere.

Code: Select all

ScriptAlias /nagios/cgi-bin "PATH_TO_NAGIOS/sbin"
ScriptAlias /cgi-bin "PATH_TO_NAGIOS/sbin"
Alias /nagios "PATH_TO_NAGIOS/share"
<Directory "PATH_TO_NAGIOS/sbin">
Options ExecCGI
AllowOverride None Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
   Order allow,deny
   Allow from all
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile PATH_TO_NAGIOS/etc/htpasswd.users
   Require valid-user
</Directory>
<Directory "PATH_TO_NAGIOS/share">
Options None
AllowOverride None Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
   Order allow,deny
   Allow from all
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile PATH_TO_NAGIOS/etc/htpasswd.users
   Require valid-user
</Directory>
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: CGI Downloading Instead of Executing

Post by lmiltchev »

@rbalabama
Let us know if eloyd's suggestion helped.
Be sure to check out our Knowledgebase for helpful articles and solutions!
rbalabama
Posts: 8
Joined: Thu May 29, 2014 12:16 pm

Re: CGI Downloading Instead of Executing

Post by rbalabama »

Thanks for the help, I kept running into errors, which I am sure is me and not what is posted. I see that a new version of core has been released so I am going to try again with a clean server and install with 4.07. If I can I will close this thread and if I still have the same issue I will open a new thread. Thanks again.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: CGI Downloading Instead of Executing

Post by tmcdonald »

Let's just keep this one thread open until we resolve the issue
Former Nagios employee
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: CGI Downloading Instead of Executing

Post by eloyd »

I'm doubtful that a new version of core will make your CGIs start working as CGIs. I'd look more at a new version of Apache. :-)
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
rhar
Posts: 1
Joined: Fri Jun 06, 2014 6:03 am

Re: CGI Downloading Instead of Executing

Post by rhar »

I am seeing the same problem with the latest version of Apache, Ubuntu and Nagios
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: CGI Downloading Instead of Executing

Post by eloyd »

Do any CGIs work on your system? Meaning, can you create just a temporary cgi-bin directory somewhere, activate it as a CGI directory, and then run a simple "hello world" CGI from it?
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Locked