配置檔案
#這裡是啟動日誌以日期的方式儲存
map $time_iso8601 $logdate {
'~^(?<ymd>\d{4}-\d{2}-\d{2})' $ymd;
default 'date-not-found';
}
#日誌儲存路徑
access_log logs/access-$logdate.log;
#這裡是啟動日誌以日期的方式儲存
map $time_iso8601 $logdate {
'~^(?<ymd>\d{4}-\d{2}-\d{2})' $ymd;
default 'date-not-found';
}
#日誌儲存路徑
access_log logs/access-$logdate.log;