Page 2 of 3
Re: CGI Downloading Instead of Executing
Posted: Tue Jun 03, 2014 5:09 pm
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?
Re: CGI Downloading Instead of Executing
Posted: Wed Jun 04, 2014 11:54 am
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
Re: CGI Downloading Instead of Executing
Posted: Wed Jun 04, 2014 12:10 pm
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.
Re: CGI Downloading Instead of Executing
Posted: Wed Jun 04, 2014 12:23 pm
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>
Re: CGI Downloading Instead of Executing
Posted: Wed Jun 04, 2014 4:53 pm
by lmiltchev
@rbalabama
Let us know if eloyd's suggestion helped.
Re: CGI Downloading Instead of Executing
Posted: Thu Jun 05, 2014 1:27 pm
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.
Re: CGI Downloading Instead of Executing
Posted: Thu Jun 05, 2014 1:31 pm
by tmcdonald
Let's just keep this one thread open until we resolve the issue
Re: CGI Downloading Instead of Executing
Posted: Thu Jun 05, 2014 5:28 pm
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.

Re: CGI Downloading Instead of Executing
Posted: Fri Jun 06, 2014 8:45 am
by rhar
I am seeing the same problem with the latest version of Apache, Ubuntu and Nagios
Re: CGI Downloading Instead of Executing
Posted: Fri Jun 06, 2014 9:08 am
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?