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?
There are a number of nice tools to capture run-time errors of Perl web apps and show them to you. These debugging tools can be disabled in production through various means. They basically "eval" the bulk of the code, allow them to handle most errors. Some examples:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With