Error log questions

Dan Dascalescu ddascalescu+nginx at gmail.com
Tue Jan 6 06:59:58 MSK 2009


Igor Sysoev <is at ...> writes:

> 
> On Wed, Sep 05, 2007 at 08:14:31AM +0300, Athan Dimoy wrote:
> 
> > I want to use server_log outside server {} context to save nginx messages 
> > only (startup, application errors, warnings etc). The problem is that even 
> > when error_log is outside http {...} or server {...}, it still saves all 
> > the messages of virtual servers ("No such file or directory" etc).
> > 
> 
> Does this work for you:
> 
> error_log   main_error.log;
> 
> http {
>     error_log   http_error.log;
> 
>     server  {
>          server_name   one;
>          error_log     http_one_error.log;
>     }
> 

That did not work for me. Here is the full config file:

error_log logs/main_error.log;

events {
    worker_connections  1024;
}

http {
    error_log logs/http_error.log;
    server {
        server_name dandascalescu.com;
        access_log logs/the_com.access;
        error_log logs/the_com.error;
    }
}

When the server receives a request for http://dandacalescu.com/nonexistent.file,
the request shows up in the access log, but all 3 error logs remain blank. The
error only shows up in the main_error.log if I comment the http_error.log and
the_com.error lines.

I'm using nginx version 0.6.34.

I would submit a bug for this but there seems to be no real bug tracking system
for nginx.






More information about the nginx mailing list