Re: [users@httpd] cgi interpreters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>On Tue, Sep 3, 2013 at 4:05 PM, azurIt <azurit@xxxxxxxx> 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@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux