Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm a bit worried because its been a couple of days and my access log file is up to 250MB+. Does it roll log files over and delete them? I'd like for there only to be 1GB or less of log files total.

share|improve this question
add comment

1 Answer

Unlike apache, which provides the rotatelogs utility, ngingx relies on the OS for this task, specifically in the logrotate(8) utility.

In the nginx wiki, it is noted that file rotation can be safely handled using the USR1 signal. The same wiki page links to the Debian default lograte(8) script installed along the nginx package:

/var/log/nginx/*.log {
        rotate 52
        create 640 root adm
                [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.