Search code examples
loggingnginxlog-rotation

Nginx log rotation is happening without any file in logrotation.d


I just compiled and installed nginx in RPM based Linux. Noticed that log rotation of Access logs and error logs are taking place. but there is no file in /logrotation.d/ which operated on the directory /var/log/nginx/ .

I need to change the file name format of the archived logs, but as there is no file in logrotation.d, dont know what to change.

Any help will be appreciated. Thanks :)


Solution

  • There was some default policy of nginx. Just create an entry in logrotation.d it will override.