ngx_http_log_module
access_log
| Syntax: | access_log path [format [buffer=size] [gzip[=level]] [flush=time] [if=condition]];
access_log off;
| | —- | —- | | Default: | access_log logs/access.log combined; | | Context: | http, server, location, if in location, limit_except |
log_format
| Syntax: | log_format name [escape=default|json|none] string …;
| | —- | —- | | Default: | log_format combined “…”; | | Context: | http |
open_log_file_cache
| Syntax: | open_log_file_cache max=N [inactive=time] [minuses=_N] [valid=time];
open_log_file_cache off;
| | —- | —- | | Default: | open_log_file_cache off; | | Context: | http, server, location |
open_log_file_cache max=1000 inactive=20s min_uses=3 valid=1m
max=1000 最大fd缓存数,满了根据 lru 关闭
inactive=20s
min_uses=3 在 inactive 时间内最少 3 次访问的缓存fd 保留
valid=1m
