http {
include mime.types;
default_type application/octet-stream;
map $time_iso8601 $logdate {
'~^(?<ymd>\d{4}-\d{2}-\d{2})'
$ymd;
default
'date-not-found'
;
}
access_log logs/access-$logdate.log;