When you start creating virtual hosts under NGinx and give them separate access and error logs don't forget to update the logrotate configuration otherwise your logs just keep growing.
I have named my logs with .access and .error extensions instead of the default .log option so that has necessitated the following change to the /etc/logrotate.d/nginx file
/var/log/nginx/*log /var/log/nginx/*access /var/log/nginx/*error { daily rotate 10 missingok notifempty compress sharedscripts postrotate /bin/kill -USR1 $(cat /var/run/nginx.pid 2>/dev/null) 2>/dev/null || : endscript }
0 Comments