我使用nginx运行Phusion Passenger 4.0.40。
服务器用于托pipe多个网站,每个网站都有自己的error.log文件。
但是,如果应用程序在启动过程中崩溃,则不error.log错误消息写入网站的error.log ,而是写入全局error.log 。 由于全局error.log不能被网站访问,所以很难debugging这个问题。
有没有办法将console.log()从全局error.log启动错误redirect到网站的error.log ?
这里是nginxconfiguration的相关部分:
error_log logs/error.log; http { passenger_friendly_error_pages off; } server { passenger_enabled on; error_log /var/www/subdomain/log/error.log; }
任何帮助表示赞赏。 谢谢
正如在官方支持论坛上回答的那样,目前这是不可能的。 所有stdout / stderr日志都写入全局nginx错误日志。
参考: https : //groups.google.com/forum/#!topic/phusion- passenger/ qu01NLqiUlo