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?
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;
either
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.
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'