iyufygfd 发表于 2016-12-26 10:55:10

nginx访问日志格式

$time_iso8601 ISO8601标准格式下的本地时间。
$time_local 通用日志格式下的本地时间。

我们在配置访问日志的时候,一般都是按照默认格式,但是我觉得$time_local换成$time_iso8601更直观一些。

log_formatmain'$remote_addr - $remote_user $time_iso8601"$request" '
                         '$status $body_bytes_sent "$http_referer" '
                         '"$http_user_agent" "$http_x_forwarded_for"';

access_loglogs/access.logmain;

页: [1]
查看完整版本: nginx访问日志格式