1

I am deleting all cache files and unused files since my AWS instance reaches 100% capacity nowadays. My setup is Nginx serving though php5-fpm with opcode cache. I have enabled access_log main in the nginx conf. Should it be safe to delete this file?

2
  • 1
    I have enabled access_log main- sounds like there is that exact string in your nginx.conf, and thus it's using a file named "main" as the access log. That's not the right usage of the access_log directive - the expected syntax when specifying a log format is "access_log path format;". If that's not the problem: add your nginx conf file to the question.
    – AD7six
    Dec 26, 2014 at 9:11
  • Yes it was the nginx log. I had set it as "access_log main" and it was not under logrotate hence it had grown in size. Dec 31, 2014 at 11:18

1 Answer 1

2

It looks to me that file is nginx log file, so take a look inside with less and if it is, truncate it with "> main". Usually when you specify access logs you set it like this

access_log path_to_log_file/log_file_name.log main;

As you can see it here: http://nginx.org/en/docs/http/ngx_http_log_module.html

Probably best thing to do is setup your nginx logs to be rotated so this wont be happening again (Note: You will lose old logs in process, but it looks like you don't need them anyway).

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .