Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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.


share|improve this answer

Your Answer


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.