You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Maciej Piechotka <uz...@gmail.com> on 2010/02/14 13:28:54 UTC

[users@httpd] Default program for CGI

Is it possible to specify a handler for files in CGI?
I.e. have:

SomeDirectiveCGI .pl /usr/bin/perl

I'd like to install a PHP script on server where PHP is available only
through SuExec due to security reasons. And adding such option
to .htaccess would be much simpler to maintain then adding to each file
(especially that I don't know how does it react with php include):
#!/path/to/php

I haven't found anything similar in documentation but before submitting
bug I prefer to ask here.

Regards


Re: [users@httpd] Default program for CGI

Posted by Nilesh Govindarajan <li...@itech7.com>.
On 02/14/2010 05:58 PM, Maciej Piechotka wrote:
> Is it possible to specify a handler for files in CGI?
> I.e. have:
>
> SomeDirectiveCGI .pl /usr/bin/perl
>
> I'd like to install a PHP script on server where PHP is available only
> through SuExec due to security reasons. And adding such option
> to .htaccess would be much simpler to maintain then adding to each file
> (especially that I don't know how does it react with php include):
> #!/path/to/php
>
> I haven't found anything similar in documentation but before submitting
> bug I prefer to ask here.
>
> Regards
>

You may want to check out this article- 
http://www.itech7.com/Linux/Apache2-PHP-FastCGI-SuExec

After a lot of struggling I was able to do this. Also its better to use 
FastCGI over standard CGI for performance reasons.

-- 
Nilesh Govindarajan
Site & Server Adminstrator
www.itech7.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Re: Default program for CGI

Posted by Maciej Piechotka <uz...@gmail.com>.
On Mon, 2010-02-15 at 15:42 +0530, Nilesh Govindarajan wrote:
> On 02/15/2010 02:54 PM, Maciej Piechotka wrote:
> > On Sun, 2010-02-14 at 08:50 -0500, Eric Covener wrote:
> >> On Sun, Feb 14, 2010 at 7:28 AM, Maciej Piechotka<uz...@gmail.com>  wrote:
> >>> Is it possible to specify a handler for files in CGI?
> >>> I.e. have:
> >>>
> >>> SomeDirectiveCGI .pl /usr/bin/perl
> >>
> >> You can use Action
> >>
> >
> > I cannot - it is either not installed or blocked. I will talk today to
> > figure out which.
> >
> > Regards
> 
> Are you trying to configure it in .htaccess ? If so, it won't work.
> 

Yes. I have page in userdir.

I can ask however admin to change global configuration as long as it
will be in SuExec.

Regards


[users@httpd] Re: Re: Default program for CGI

Posted by Maciej Piechotka <uz...@gmail.com>.
On Mon, 2010-02-15 at 15:42 +0530, Nilesh Govindarajan wrote:
> On 02/15/2010 02:54 PM, Maciej Piechotka wrote:
> > On Sun, 2010-02-14 at 08:50 -0500, Eric Covener wrote:
> >> On Sun, Feb 14, 2010 at 7:28 AM, Maciej Piechotka<uz...@gmail.com>  wrote:
> >>> Is it possible to specify a handler for files in CGI?
> >>> I.e. have:
> >>>
> >>> SomeDirectiveCGI .pl /usr/bin/perl
> >>
> >> You can use Action
> >>
> >
> > I cannot - it is either not installed or blocked. I will talk today to
> > figure out which.
> >
> > Regards
> 
> Are you trying to configure it in .htaccess ? If so, it won't work.
> 

After enabling mod_actions it seems to work.

Thanks everyone

Re: [users@httpd] Re: Default program for CGI

Posted by Nilesh Govindarajan <li...@itech7.com>.
On 02/15/2010 02:54 PM, Maciej Piechotka wrote:
> On Sun, 2010-02-14 at 08:50 -0500, Eric Covener wrote:
>> On Sun, Feb 14, 2010 at 7:28 AM, Maciej Piechotka<uz...@gmail.com>  wrote:
>>> Is it possible to specify a handler for files in CGI?
>>> I.e. have:
>>>
>>> SomeDirectiveCGI .pl /usr/bin/perl
>>
>> You can use Action
>>
>
> I cannot - it is either not installed or blocked. I will talk today to
> figure out which.
>
> Regards

Are you trying to configure it in .htaccess ? If so, it won't work.

-- 
Nilesh Govindarajan
Site & Server Adminstrator
www.itech7.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Default program for CGI

Posted by Maciej Piechotka <uz...@gmail.com>.
On Sun, 2010-02-14 at 08:50 -0500, Eric Covener wrote:
> On Sun, Feb 14, 2010 at 7:28 AM, Maciej Piechotka <uz...@gmail.com> wrote:
> > Is it possible to specify a handler for files in CGI?
> > I.e. have:
> >
> > SomeDirectiveCGI .pl /usr/bin/perl
> 
> You can use Action
> 

I cannot - it is either not installed or blocked. I will talk today to
figure out which.

Regards

Re: [users@httpd] Default program for CGI

Posted by Eric Covener <co...@gmail.com>.
On Sun, Feb 14, 2010 at 7:28 AM, Maciej Piechotka <uz...@gmail.com> wrote:
> Is it possible to specify a handler for files in CGI?
> I.e. have:
>
> SomeDirectiveCGI .pl /usr/bin/perl

You can use Action

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org