Simplifying the software stack - any reason CGI can't be implemented into nginx?


#1

Perhaps the way standard CGI programs run (compiled CGI, especially
Perl, etc.) is not compatible with how nginx does it’s request
processing, but couldn’t someone get a CGI module created for nginx so
things like Apache don’t have to be used for Perl (or other CGI-based)
apps?

I would love to get Apache out of the mix.

Or, some sort of php-fpm type FastCGI daemon thing that will handle
CGI requests without requiring modification of the code? (I know there
is some FCGI.pm thing, but that requires modifications to the code,
right? I’d want it to be seamless)


#2

On pon, gru 29, 2008 at 03:12:25 -0800, mike wrote:

Perhaps the way standard CGI programs run (compiled CGI, especially
Perl, etc.) is not compatible with how nginx does it’s request
processing, but couldn’t someone get a CGI module created for nginx so
things like Apache don’t have to be used for Perl (or other CGI-based)
apps?

http://nginx.localdomain.pl/wiki/FcgiWrap

I took the liberty of adding it to the wiki page at:

http://wiki.codemongers.com/NginxSimpleCGI

I would love to get Apache out of the mix.

Or, some sort of php-fpm type FastCGI daemon thing that will handle
CGI requests without requiring modification of the code? (I know there
is some FCGI.pm thing, but that requires modifications to the code,
right? I’d want it to be seamless)

With fcgiwrap you need to start it somehow (e.g. using spawn-fcgi or a
simple Perl script from my website) but it’s basically fire and forget
and needs no modification of existing scripts.

Best regards,
Grzegorz N.


#3

Personally, I think the current modular approach is the best for
everyone.
It offers the best flexibility and performance.