nginx - enable async AND rotating access log -




for reasons, have write access.log mounted fileshare.

to let rotate, extracted current year , month , set log path to

access_log /media/log/nginx/$year_$month_access.log log_format; 

this resulted performance issue (because of mounted fileshare), had enable buffering. buffering can't use variables in access_log directive anymore:

access_log /media/log/nginx/access.log log_format buffer=32k flush=30m; 

so on month, access.log got big.

is there way have both: async and rotating access.log? (ideally via nginx.conf only, no cronjob or so)





wiki

Comments