Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.