FCGI.pm ?

Chris Cortese cortese.consulting at gmail.com
Fri Feb 27 13:31:42 MSK 2009


What about the nginx equivalent for the Apache ScriptAlias directive for 
cgi-bin?

I'm running fcgiwrap and have the following in my site config:

  location ~ .pl$ {
    fastcgi_pass unix:/tmp/cgi.sock;
    include /etc/nginx/fastcgi_params;
  }

My directory structure is like:  (higher up part of the path omitted for 
simplicity)
/trunk/cgi-bin
/trunk/html/public/index.php

If I want to call http://mysite.com/cgi-bin/upload.pl    ...  How can I 
tell nginx where to find this?


Thanks,
Chris


Jim Ohlstein wrote:
> The way I am using it (and the credit ALL goes to Grzegorsz who helped me a great deal with it) on CentOS is to use the Perl script on that page (http://nginx.localdomain.pl/wiki/FcgiWrap).
>
> Then you add the following to the site config:
>
> location ~ .pl$ {
> fastcgi_pass unix:/tmp/cgi.sock;
> include /usr/local/nginx/conf/fastcgi_params;
> }
>
> You can adjust the number of child processes to suit your needs.
>
>   
>> -----Original Message-----
>> From: owner-nginx at sysoev.ru [mailto:owner-nginx at sysoev.ru] On Behalf Of
>> Chris Cortese
>> Sent: Thursday, February 26, 2009 6:11 AM
>> To: nginx at sysoev.ru
>> Subject: Re: FCGI.pm ?
>>
>> Thanks.  That got me a little closer.
>>
>> Now, I have built fcgiwrap but I don't know how to use it.  From the
>> http://nginx.localdomain.pl/wiki/FcgiWrap page, can anyone elaborate on
>> what the following means?
>>
>> You can then start fcgiwrap (possibly in several instances) using
>> spawn-fcgi or a similar tool (you must pass an open socket as fd 0; my
>> Spawner? will be very nice for this once I actually make it usable and
>> publish it) and send requests to it using fastcgi_pass. That's it.
>>
>>
>> Thanks.
>>
>> Grzegorz Nosek wrote:
>>     
>>> On czw, lut 26, 2009 at 02:09:20 -0800, Chris Cortese wrote:
>>>
>>>       
>>>> I am still not finding this fcgi_stdio.h anywhere.
>>>>
>>>> I went to these links:
>>>>
>>>>         
>> http://rpmfind.net/linux/rpm2html/search.php?query=libfcgi.so.0()(64bit
>> )
>>     
>>>> http://rpmfind.net/linux/RPM/fedora/updates/8/x86_64/debug/fcgi-
>>>>         
>> debuginfo-2.4.0-6.fc8.x86_64.html
>>     
>>>> I tried installing:
>>>>
>>>>
>>>>         
>> ftp://download.fedora.redhat.com/pub/fedora/linux/updates/8/SRPMS.newke
>> y/fcgi-2.4.0-6.fc8.src.rpm
>>     
>> ftp://rpmfind.net/linux/fedora/releases/8/Everything/x86_64/os/Packages
>> /fcgi-2.4.0-4.fc8.x86_64.rpm
>>     
>>>> ftp://rpmfind.net/linux/fedora/updates/8/x86_64.newkey/fcgi-2.4.0-
>>>>         
>> 6.fc8.x86_64.rpm
>>     
>>>> Any other place to find this stuff?
>>>>
>>>>         
>>> I don't use Fedora but try installing fcgi-devel (I guess that's the
>>> right package name) as well as fcgi. You need the headers (fcgi-
>>>       
>> devel)
>>     
>>> to compile fcgiwrap and the binaries (fcgi) to run it.
>>>
>>> Best regards,
>>>  Grzegorz Nosek
>>>
>>>
>>>       
>
>
>
>   






More information about the nginx mailing list