You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Francesc Guasch <fr...@etsetb.upc.es> on 2003/03/18 10:58:17 UTC
binary cgi mess ( repost )
I posted this, I received a couple of answers but the problem
is still unsolved.
I have a mod_perl server and I need to add a cgi application
outside mod_perl, nagios.
I followed the guide and when I try to use the cgis, the
binary files are displayed instead of executed.
I tried the same in another apache server without Mason
and it worked well. So I think something of my config must
be messing it.
I made sure the mason handler wasn't in the middle. I added
a debugging line in the very beginning of it.
I added this to the config file, suggested by Abdul-Wahid
AddHandler cgi-script .cgi
Then he the binary wasn't displayed in the browser, but
downloaded. ( A save dialog was showed ).
Here is the config for apache:
AddType application/x-httpd-cgi .cgi
ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi/
<Location /nagios/cgi-bin>
Options ExecCGI
</Location>
<Directory /usr/lib/nagios/cgi/>
AllowOverride AuthConfig
Options ExecCGI
order deny,allow
deny from all
allow from ip_removed
</Directory>
Alias /nagios/ /usr/share/nagios/
<Directory /usr/share/nagios/>
AllowOverride AuthConfig
Options None
order deny,allow
deny from all
allow from ip_removed
</Directory>
use Apache::AuthDBI;
any hints ? Thank you for your time.
--
frankie
Re: binary cgi mess ( repost )
Posted by Francesc Guasch <fr...@etsetb.upc.es>.
Abdul-wahid Paterson wrote:
> Hi,
Thank you again for answering me, Abdul-wahid.
> This is the config I have for nagios on one of my servers. I also have
> mod_perl working so there should be no problem with the two together.
>
> (My directory paths are different to yours but the principle is the
> same)
I tried the same configuration options as you, and it keeps
doing it bad. Maybe it isn't mod_perl related and I should
ask in an apache list.
--
frankie
Re: binary cgi mess ( repost )
Posted by Abdul-wahid Paterson <aw...@lintrix.net>.
Hi,
This is the config I have for nagios on one of my servers. I also have
mod_perl working so there should be no problem with the two together.
(My directory paths are different to yours but the principle is the
same)
ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/
<Directory "/usr/local/nagios/sbin/">
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
Alias /nagios/ /usr/local/nagios/share/
<Directory "/usr/local/nagios/share">
Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
Regards,
Abdul-Wahid
On Tue, 2003-03-18 at 09:58, Francesc Guasch wrote:
> I posted this, I received a couple of answers but the problem
> is still unsolved.
>
> I have a mod_perl server and I need to add a cgi application
> outside mod_perl, nagios.
>
> I followed the guide and when I try to use the cgis, the
> binary files are displayed instead of executed.
> I tried the same in another apache server without Mason
> and it worked well. So I think something of my config must
> be messing it.
>
> I made sure the mason handler wasn't in the middle. I added
> a debugging line in the very beginning of it.
>
> I added this to the config file, suggested by Abdul-Wahid
> AddHandler cgi-script .cgi
> Then he the binary wasn't displayed in the browser, but
> downloaded. ( A save dialog was showed ).
>
>
> Here is the config for apache:
>
> AddType application/x-httpd-cgi .cgi
> ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi/
>
> <Location /nagios/cgi-bin>
> Options ExecCGI
> </Location>
>
> <Directory /usr/lib/nagios/cgi/>
> AllowOverride AuthConfig
> Options ExecCGI
> order deny,allow
> deny from all
> allow from ip_removed
> </Directory>
>
> Alias /nagios/ /usr/share/nagios/
> <Directory /usr/share/nagios/>
> AllowOverride AuthConfig
> Options None
> order deny,allow
> deny from all
> allow from ip_removed
> </Directory>
> use Apache::AuthDBI;
>
> any hints ? Thank you for your time.
Re: binary cgi mess ( repost )
Posted by Francesc Guasch <fr...@etsetb.upc.es>.
> Francesc Guasch <fr...@etsetb.upc.es> wrote:
>> I have a mod_perl server and I need to add a cgi application
>> outside mod_perl, nagios.
>> I followed the guide and when I try to use the cgis, the
>> binary files are displayed instead of executed.
>
Frank Maas wrote:
> Comparing your post and that of others, I see that you use
> Authentication through mod_perl. What happens if you completely
> disable Authentification? Do you still experience the same
nice try Frank. I didn't think about it. I added basic auth
from a passwd file. I made sure the password was different
so I was using the new config. I'm afraid it didn't help,
what a pity.
--
frankie
RE: binary cgi mess ( repost )
Posted by Frank Maas <fr...@cheiron-it.nl>.
Comparing your post and that of others, I see that you use
Authentication through mod_perl. What happens if you completely
disable Authentification? Do you still experience the same
problem?
--Frank
Re: binary cgi mess ( repost )
Posted by Francesc Guasch <fr...@etsetb.upc.es>.
Nikolaus Rath wrote:
> Francesc Guasch <fr...@etsetb.upc.es> wrote:
>
>><Location /nagios/cgi-bin>
>> Options ExecCGI
>></Location>
>>
>>Alias /nagios/ /usr/share/nagios/
>><Directory /usr/share/nagios/>
>> AllowOverride AuthConfig
>> Options None
>
> I suspect that the Options directive in the directory section
> overwrites the one in the location directive. It doesn't matter that
> the Location is more specific because it is evaluated earlier in the
> request loop.
Nice try, I added Options ExecCGI in both Directories, but
it does the same. I make sure it isn't cached using wget
for reading the page.
--
frankie
Re: binary cgi mess ( repost )
Posted by Nikolaus Rath <Ni...@rath.org>.
Francesc Guasch <fr...@etsetb.upc.es> wrote:
> <Location /nagios/cgi-bin>
> Options ExecCGI
> </Location>
>
> Alias /nagios/ /usr/share/nagios/
> <Directory /usr/share/nagios/>
> AllowOverride AuthConfig
> Options None
> order deny,allow
> deny from all
> allow from ip_removed
> </Directory>
I suspect that the Options directive in the directory section
overwrites the one in the location directive. It doesn't matter that
the Location is more specific because it is evaluated earlier in the
request loop.
--Nikolaus