我剛剛安裝了fcgiwrap和spawn-fcgi以便能夠在nginx中使用perl腳本。我說這樣的事情在我的網站的配置:如何獲得nginx錯誤日誌中的perl腳本錯誤(Nginx與FCGIwrap)
location ~ \.pl$ {
gzip off;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
include fastcgi_params;
fastcgi_index index.pl;
}
它的工作原理,但瀏覽器會顯示以下信息,如果有在Perl代碼中的錯誤:
An error occurred while reading CGI reply (no response received)
而且我無法找到perl的錯誤在nginx日誌中。命令行上的「perl -c」有助於解決perl編譯錯誤,但它不能幫助我解決運行時錯誤。
如何告訴perl或fcgiwrap將錯誤保存在nginx錯誤日誌或其他一些日誌文件中?