Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Running Ubuntu + PHP + NGINX. Why does the file /usr/local/nginx/on take up so much hard drive space on my web server?

What can i do to reduce it?

share|improve this question
How much space does it take on your web server, and how much were you expecting? – Gareth Jan 10 '11 at 9:02
up vote 6 down vote accepted

The file name on does not seem to be installed along with Nginx.

Let me have a guess you have a line in you configuration file:

access_log on;


error_log on;

which means Nginx writes access log into file on in its standard directory, which is probably /usr/local/nginx in your case.

share|improve this answer
thanks that was it – caseadilla Jan 11 '11 at 7:05

Yes, you should change your access_log statements to the path of the log file, and setup log rotation (you must send SIGUSR1 to nginx afterwards so it reopens the log file).

The keyword 'off' is accepted for access_log to prevent logging all together However, the error_log cannot be turned off, instead you must do: error_log /dev/null crit;

logging only critical errors to /dev/null

else you will end up with a large file called 'off'

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.