Standard CGI under nginx


#1

Hi folks

I see the example using normal CGI under nginx, via wrapper, whenever
the cgi-wrapper.pl fail to start

ficovh:~> /usr/pkg/bin/cgiwrap-fcgi.pl&
[1] 12390

ficovh:~> Can’t locate syscall.ph in @INC (did you run h2ph?) (@INC
contains: /usr/pkg/lib/perl5/site_perl/5.8.0/i386-netbsd-thread-multi
/usr/pkg/lib/perl5/site_perl/5.8.0 /usr/pkg/lib/perl5/site_perl
/usr/pkg/lib/perl5/vendor_perl/5.8.0/i386-netbsd-thread-multi
/usr/pkg/lib/perl5/vendor_perl/5.8.0 /usr/pkg/lib/perl5/vendor_perl
/usr/pkg/lib/perl5/5.8.0/i386-netbsd-thread-multi
/usr/pkg/lib/perl5/5.8.0 .) at /usr/pkg/bin/cgiwrap-fcgi.pl line 9.

While I don’t know a perl hacker, I need run simple CGI scripts from
nginx.

I’m using NetBSD 4 Stable in this small machine.


#2

i was using thttpd for cgi scripts and just proxying to it, but it had
some random crashes and i needed some environment variable support and
couldn’t figure out how in thttpd. so instead i have a small apache
instance i proxy to for cgi scripts.

best i could do.


#3

On Tue, 14 Oct 2008 13:58:51 -0700, mike removed_email_address@domain.invalid wrote:

i was using thttpd for cgi scripts and just proxying to it, but it had
some random crashes and i needed some environment variable support and
couldn’t figure out how in thttpd. so instead i have a small apache
instance i proxy to for cgi scripts.

I have a lighttp setup to handle CGI (movable type mainly).

Cheers

Dave


#4

Francisco Valladolid wrote:

/usr/pkg/lib/perl5/site_perl/5.8.0 /usr/pkg/lib/perl5/site_perl

try running:

cd /usr/include
h2ph -r -l

in order to generate syscall.ph

luben


#5

On Tue, Oct 14, 2008 at 02:33:42PM -0500, Francisco Valladolid wrote:

/usr/pkg/lib/perl5/site_perl/5.8.0 /usr/pkg/lib/perl5/site_perl
/usr/pkg/lib/perl5/vendor_perl/5.8.0/i386-netbsd-thread-multi
/usr/pkg/lib/perl5/vendor_perl/5.8.0 /usr/pkg/lib/perl5/vendor_perl
/usr/pkg/lib/perl5/5.8.0/i386-netbsd-thread-multi
/usr/pkg/lib/perl5/5.8.0 .) at /usr/pkg/bin/cgiwrap-fcgi.pl line 9.

That’s one of the reasons that script is positively ugly.

While I don’t know a perl hacker, I need run simple CGI scripts from nginx.

Have a look at http://github.com/gnosek/fcgiwrap/tree/master (the home page is in the making)

That’s a C application that does roughly the same thing as the script.
You need headers and libraries for libfcgi and a process spawner, like
spawn-fcgi from lighttpd. Works fine for me.

If you need any assistance, feel free to mail me.

Best regards,
Grzegorz N.