httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "azurIt" <azu...@pobox.sk>
Subject Re: [users@httpd] cgi interpreters
Date Wed, 04 Sep 2013 11:35:43 GMT
>On Tue, Sep 3, 2013 at 4:05 PM, azurIt <azurit@pobox.sk> wrote:
>> Hi,
>>
>> is it, somehow, possible to set CGI script interpreters in linux? For example:
>> - interpterer for .py is /usr/bin/python
>> - .sh is /bin/bash
>> etc.
>
>Check out the Action directive.  You'll probably need to write a small wrapper.


Thank you Eric, this is my working solution:

ScriptAlias /cgi-bin/ "/usr/lib/cgi-bin/"

<Directory ...>
AllowOverride all
Options +ExecCGI
AddHandler python-script .py .pyc
Action python-script /cgi-bin/python.cgi
</Directory>




Content of /usr/lib/cgi-bin/python.cgi:

#!/bin/sh
/usr/bin/env python $PATH_TRANSLATED


azur

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message