debug_connection

Syntax: debug_connection address | CIDR | unix:;
Default:
Context: events

Enables debugging log for selected client connections. Other connections will use logging level set by the error_log directive. Debugged connections are specified by IPv4 or IPv6 (1.3.0, 1.2.1) address or network. A connection may also be specified using a hostname. For connections using UNIX-domain sockets (1.3.0, 1.2.1), debugging log is enabled by the “unix:” parameter.

events {
    debug_connection 127.0.0.1;
    debug_connection localhost;
    debug_connection 192.0.2.0/24;
    debug_connection ::1;
    debug_connection 2001:0db8::/32;
    debug_connection unix:;
    ...
}
For this directive to work, nginx needs to be built with --with-debug, see “A debugging log”.
doc_nginx
2017-02-09 07:05:49
Comments
Leave a Comment

Please login to continue.