翻译-nginx-log

./configure --with-debug ...

编译开始时,指定debug编译。类似于指定一个文件安装路径。

To enable a debugging log, nginx needs to be configured to support debugging during the build:


Then the debug level should be set with the error_log directive:

error_log /path/to/log debug;
 

调试级别应该通过指令error_log指令来明确指定

The nginx binary version for Windows is always built with the debugging log support, so only setting the debug level will suffice(满足).


Note that redefining the log without also specifying the debug level will disable the debugging log. In the example below, redefining the log on the server level disables the debugging log for this server:

重新定义error_log,但是并没有指定logger的调试级别,将会使该指令失效。【我的理解是:server中的error_log重写了全局的error_log,但是没有指定debug level,所以对于这个服务server来说,debug log是无效的】

error_log /path/to/log debug;

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

To avoid this, either the line redefining the log should be commented out, or the debug level specification should also be added:

解决的办法,可以删掉或者注释掉,或者加上debug level。

error_log /path/to/log debug;

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

Debugging log for selected clients

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

error_log /path/to/log;

events {
    debug_connection 192.168.1.1;
    debug_connection 192.168.10.0/24;
 }
events指令指定影响连接进程的配置。同时使用debug_connection指令:对于这些客户端的连接使用debug日志。

你可能感兴趣的:(nginx,PHP)