Hi, I'm using nginx with this script as FastCGI wrapper, that I start with:
spawn-fcgi -F 3 -u www-data -s /var/run/perl-fcgi.sock -P /var/run/perl-fcgi.pid -- ./perl-fcgi.pl
Now, suppose I have a simple script:
#!/usr/bin/perl
print "Content-type: text/plain\r\n\r\n";
print "hello\n";
The script runs fine, and I see the "hello" when I request /text.pl. But as you can see in line 106 of the FastCGI wrapper, the script gets executed with exec(), so it basically runs in its own Perl environment. Doesn't it ruin the whole concept of FastCGI, when I don't have an already initialized script, but call it independently?
What would be the preferred way of interacting via FastCGI on nginx?
Cheers, --polemon
PS: spawn-fcgi is the program from lighttpd that starts FCGI wrappers and binds them to a socket.