I'm running Phusion Passenger 4.0.40 with nginx.
The server is used to host several websites and each has its own error.log
file.
However if an application crashes during startup, the error message is not written to the website's error.log
, rather to global error.log
. Since global error.log
is not accessible to the websites, it's hard to debug the issue.
Is there any way to redirect startup errors along with console.log()
from global error.log
to website's error.log
?
Here's the relevant part of nginx config:
error_log logs/error.log;
http {
passenger_friendly_error_pages off;
}
server {
passenger_enabled on;
error_log /var/www/subdomain/log/error.log;
}
Any help is appreciated. Thanks
As answered in the official support forum, this is not currently possible. All stdout/stderr logs are written to the global nginx error log.
Reference: https://groups.google.com/forum/#!topic/phusion-passenger/qu01NLqiUlo