Mod_scgi

I’m pleased to announce the implementation of SCGI for Nginx.

It is available from my Mercurial repository:
http://hg.mperillo.ath.cx/nginx/mod_scgi/

Note that the development is still in its early stage, however the
module is rather complete.

Note that this module is mainly an adaptation of the existing nginx
fastcgi module, with some code merged from the proxy module.

This is the reason why I have implemented the module, it was rather easy
to write reusing existing code ;-).

Please read the README file for further information.

NOTE: the current implementation does not conforms to the CGI 1.2 spec
and current practice.

   In fact mod_scgi only supports "Non-Parsed Header Output".

   See http://ken.coar.org/cgi/cgi-120-00a.html#ISSUE-001 for more
   informations.

   Supporting "Non-Parsed Header Output" will require some extra
   code, I don't know when I will implement it.

Manlio P.

Manlio P. ha scritto:

I’m pleased to announce the implementation of SCGI for Nginx.

I forgot to say that the supported directives are the same as for the
fastcgi module, with the exception of fcgi_catch_stderr and fcgi_index
not implemented and fcgi_param replaced by scgi_var.

Regards Manlio P.

That was less than a 24 hour turnaround from when you asked. Nice job!

On Wed, 16 Apr 2008 20:34:39 +0200
Manlio P. [email protected] wrote:

I’m pleased to announce the implementation of SCGI for Nginx.

It is available from my Mercurial repository:
http://hg.mperillo.ath.cx/nginx/mod_scgi/

Pretty nice!! although I am not planning using SCGI in Nginx at the
moment, I added SCGI support to my unofficial Nginx Gentoo ebuild:
http://code.connectical.com/overlay/browser/contrib/www-servers/nginx

(Gentoo users may prefer to add the entire overlay instead of manually
fetching the ebuild and related files, more more information look at
http://code.connectical.com/overlay)

My packaging adds support for the SCGI module (USE=scgi); the WSGI
module (USE=python), and my own “fancyindex” module (USE=fancyindex).

FYI, I had to remove line 1573 of ngx_http_scgi_module.c in order to
build the module with Nginx 0.6.30 because there is no “location”
member in the configuration sctruct (see attached patch). It seems to
work so my guess is that removing the line does not harm when using
Ningx 0.6.x

Cheers,

-Adrian

On Fri, 2008-05-02 at 02:29 +0200, Adrian P. wrote:

http://code.connectical.com/overlay/browser/contrib/www-servers/nginx

(Gentoo users may prefer to add the entire overlay instead of manually
fetching the ebuild and related files, more more information look at
http://code.connectical.com/overlay)

My packaging adds support for the SCGI module (USE=scgi); the WSGI
module (USE=python), and my own “fancyindex” module (USE=fancyindex).

Adrian,

Maybe you could add a note about this overlay in the Gentoo-specific
instructions on the wiki?

http://wiki.codemongers.com/NginxPlatformGentoo

Cliff

Sean A. ha scritto:

That was less than a 24 hour turnaround from when you asked. Nice job!

Thanks.

However I need some help for some questions I don’t have the time to
study:

  1. how many SCGI applications use the non parsed headers output
    (that is, return a complete HTTP 1.x response)?

    Should I keep support for these applications?

  2. for parsed headers output, is the Status header always the first
    header sent?

Regards Manlio P.

Adrian P. ha scritto:

http://code.connectical.com/overlay/browser/contrib/www-servers/nginx

Thanks!

Remember, however, that this module is not very usable since it only
support non parsed headers, but this format is depracated by CGI 1.2 and
no applications (as far as I know) uses it.

When I will find some time I will fix it, probabily with these
assumptions:

  1. nobody uses non parsed headers, so I will no more support it
  2. I will assume that Status is always the first header

I’m also planning to implement a new mod_cgi module.

work so my guess is that removing the line does not harm when using
Ningx 0.6.x

As always, my target is Nginx 0.5.x.
To make sure that mod_scgi will work with 0.6.x I have to check what has
been modified in the fastcgi and proxy module (since I have just copied
the code from these modules).

Cheers,

-Adrian

Regards Manlio P.

On Thu, 01 May 2008 18:19:50 -0700
Cliff W. [email protected] wrote:

Pretty nice!! although I am not planning using SCGI in Nginx at the

Adrian,

Maybe you could add a note about this overlay in the Gentoo-specific
instructions on the wiki?

http://wiki.codemongers.com/NginxPlatformGentoo

Done. I think linking to the overlay page for additional instructions
should suffice, but I can add more literature in the wiki, if
needed/requested. Just let me know :wink:

Cheers,

-Adrian

Fool Pig ha scritto:

[…]

i can’t open the url and download the mod_scgi
http://hg.mperillo.ath.cx/nginx/mod_scgi/

I have checked it right know and it works.
You can download a tar archive here:
http://hg.mperillo.ath.cx/nginx/mod_scgi/archive/tip.tar.gz

anybody can send the mod_scgi to my email:
[email protected]

THX

Manlio P.

Manlio P. wrote:

Adrian P. ha scritto:

http://code.connectical.com/overlay/browser/contrib/www-servers/nginx

Thanks!

Remember, however, that this module is not very usable since it only
support non parsed headers, but this format is depracated by CGI 1.2 and
no applications (as far as I know) uses it.

When I will find some time I will fix it, probabily with these
assumptions:

  1. nobody uses non parsed headers, so I will no more support it
  2. I will assume that Status is always the first header

I’m also planning to implement a new mod_cgi module.

work so my guess is that removing the line does not harm when using
Ningx 0.6.x

As always, my target is Nginx 0.5.x.
To make sure that mod_scgi will work with 0.6.x I have to check what has
been modified in the fastcgi and proxy module (since I have just copied
the code from these modules).

Cheers,

-Adrian

Regards Manlio P.

i can’t open the url and download the mod_scgi
http://hg.mperillo.ath.cx/nginx/mod_scgi/

anybody can send the mod_scgi to my email:
[email protected]

THX

Manlio P. wrote:

Fool Pig ha scritto:

[…]

i can’t open the url and download the mod_scgi
http://hg.mperillo.ath.cx/nginx/mod_scgi/

I have checked it right know and it works.
You can download a tar archive here:
http://hg.mperillo.ath.cx/nginx/mod_scgi/archive/tip.tar.gz

anybody can send the mod_scgi to my email:
[email protected]

THX

Manlio P.

Manlio P.

Sorry,I can’t open the website,I don’t konw what’s wrong

Maybe the GFW deney it,but i can’t download it when i use the proxy

Manlio P.,you can send the tip.tar.gz to my email address

Thanks

best regards

Foolpig

Fool Pig wrote:

Manlio P. wrote:

Fool Pig ha scritto:

[…]

i can’t open the url and download the mod_scgi
http://hg.mperillo.ath.cx/nginx/mod_scgi/

I have checked it right know and it works.
You can download a tar archive here:
http://hg.mperillo.ath.cx/nginx/mod_scgi/archive/tip.tar.gz

anybody can send the mod_scgi to my email:
[email protected]

THX

Manlio P.

Manlio P.

Sorry,I can’t open the website,I don’t konw what’s wrong

Maybe the GFW deney it,but i can’t download it when i use the proxy

Manlio P.,you can send the tip.tar.gz to my email address

Thanks

best regards

Foolpig

Manlio P.:

Thanks,i use firefox and tor to solve the GFW
now i download the mod_scgi,the version is mod_scgi-b466baa5fcdb.tar.gz

I go to test the nginx-0.6.30 and mod_scgi

Best Regards

Foolpig