0

how do i put a limit on the file size for files in etc/httpd/logs

every time i remove those files to free up my space, they come back after 1-2 weeks and take up the entire EBS volume space

Rakib
  • 12,376
  • 16
  • 77
  • 113

1 Answers1

1

The best thing to do is to use log rotation. You can swap out the log files hourly or daily, then delete the older ones.

With Apache you can use the rotatelogs program. Most Unix operating systems also have something like logrotate.d, which can easily be configured to rotate and then delete.

tedder42
  • 23,519
  • 13
  • 86
  • 102
  • what about the `log_errors_max_len` setting in `/etc/php.ini`? I set it to 1024. Shouldn't that have worked to tackle the problem? – Rakib Mar 12 '15 at 06:55
  • 1
    That's for [the maximum length of a single line](http://stackoverflow.com/questions/1966540/log-errors-max-len-1024-in-php-ini-but-php-log-keeps-growing). – tedder42 Mar 12 '15 at 13:40