I just installed fcgiwrap and spawn-fcgi to be able to use perl scripts in nginx. I added something like this in my site config:
location ~ \.pl$ {
gzip off;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
include fastcgi_params;
fastcgi_index index.pl;
}
It works but browser shows the following message if there is an error in perl code:
An error occurred while reading CGI reply (no response received)
And I am not able to find perl errors in the nginx logs. "perl -c" on the command line helps if there are perl compilation errors but it does not help me solve runtime errors.
How can I tell perl or fcgiwrap to save errors in nginx error log or some other log file?