Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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/ ] || kill -USR1 `cat /var/run/`
share|improve this answer

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.