I have NGINX working happily with PHP FPM all tickety-boo.
I am trying to add some Perl pages. I have this in my default site config;
location ~ \.pl$ {
gzip off;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.pl;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/www/$fastcgi_script_name;
}
Browsing to perl pages (example below) in my browser just displays the source code. It's like either the code isn't being passed to the FPM or its not executing it and just passing it back.
I don't know what to do here; I'm not sure how to troubleshoot this. Nothing in NGINX error.log or php5-fpm.log.
test.pl;
#!/usr/bin/perl
print "Content-type:text/html\n\n";
print <<EndOfHTML;
<html><head><title>Perl Environment Variables</title></head>
<body>
<h1>Perl Environment Variables</h1>
EndOfHTML
foreach $key (sort(keys %ENV)) {
print "$key = $ENV{$key}<br>\n";
}
print "</body></html>";