This is similar to this question, which got no responses: How to debug CGI over fcgiwrap/nginx
How do I get perl errors to be automatically placed in the nginx error log? Right now, when there is any perl error, the following message goes in the error log:
2014/05/11 22:43:48 [error] 1730#0: *5 connect() failed (111: Connection refused) while connecting to upstream, client: localhost, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost"
This is completely useless for debugging. I can use something like CGI::Carp qw{fatalsToBrowser}, but this is not optimal. It would be better to have it logged to a server-side file.