While setting up the Apache HTTP server in AIX, I never realize there is a log file, access_log
, located at /var/log/httpd. This file is keep growing until 600+ MB, I am not able to keep track of its growing and may bring other issues in the future, may I know can I stop growing the file?
Asked
Active
Viewed 1,592 times
-1

huahsin68
- 147
- 3
- 11
-
2Shut down the web server. Then the log will stop growing. – Michael Hampton Apr 02 '13 at 05:48
-
I can't stop the server as I am still using it. How could I write an auto clean script on the file so that I could maintain the file size? – huahsin68 Apr 02 '13 at 05:49
3 Answers
2
Use something like logrotate, or the rotatelogs utility that came with Apache, to rotate your log files on a regular basis.

Michael Hampton
- 244,070
- 43
- 506
- 972
1
I don't know about AIX but on other platforms the common way to handle that issue is to rotate the logs.
logrotate and it's configuration at /etc/logrotate.conf is the most common way to do that.
It looks like that is supported on AIX: http://www-01.ibm.com/support/docview.wss?uid=isg3T1012796

TonyB
- 383
- 2
- 6
0
Check the file httpd.conf (or apache2.conf), find the logging related entries and disable them.

nn4l
- 1,336
- 5
- 23
- 40