A debugging log

nginx


news
about
download
security advisories
documentation
introduction
howto
wiki
links
support

To enable a debugging log, you first should configure nginx to build with the debugging:

./configure --with-debug ...

and then set the “debug” level of the “error_log”:

error_log  /path/to/log  debug;

The nginx/Windows binary version is always built with the debugging log support. Therefore, you should set the “debug” level only.

Note, that a defining log on another level, for example, on server level disables the debugging log for this server:

error_log  /path/to/log  debug;

http {
    server {
        error_log  /path/to/log;
        ...

You should either comment out this server log or add the “debug” flag too:

error_log  /path/to/log  debug;

http {
    server {
        error_log  /path/to/log  debug;
        ...

It is also possible to enable the debugging log only for some addresses:

error_log  /path/to/log;

events {
    debug_connection   192.168.1.1;
    debug_connection   192.168.10.0/24;
}