Skip to content

Instantly share code, notes, and snippets.

@4ndrej

4ndrej/nginx.conf

Created Aug 14, 2020
Embed
What would you like to do?
nginx yyyy-mm logging without if
http {
#access_log logs/access.log main;
# parse \d{4}-\d{2} from $time_iso8601 into $yyyy_mm
map $time_iso8601 $yyyy_mm {
"~^(?<temp>\d{4}-\d{2})" $temp;
}
server {
listen 80;
server_name _;
location / {
access_log logs/access-80-$yyyy_mm.log;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.