cannot do from http conf file as directory has 7 types of log files
i have changes conf file with
Code:
/var/log/httpd/*log {
daily
missingok
rotate 52
compress
delaycompress
notifempty
sharedscripts
postrotate
/sbin/service httpd reload > /dev/null 2>/dev/null || true
endscript
}
renamed all log files without date ext.
ran : logrotate -f /etc/logrotate.d/httpd
and it created log with.1 extension
Code:
drwxrwxr-x. 2 root root 4096 Dec 5 08:52 .
drwxr-xr-x. 16 root root 4096 Dec 3 13:39 ..
-rw-r--r-- 1 root root 143348 Dec 5 08:52 access_log.1
-rw-r--r-- 1 root root 3411 Dec 5 08:51 error_log.1
-rw-r--r-- 1 root root 6080 Dec 5 08:52 jk-runtime-status.28481
-rw-r--r-- 1 root root 1 Dec 5 08:49 jk-runtime-status.28481.lock
-rw-r--r-- 1 root root 13395 Dec 5 08:52 mod_jk.log.1
-rw-r--r-- 1 root root 1522929 Dec 5 08:52 rewrite.log.1
-rw-r--r-- 1 root root 28671 Dec 5 08:52 ssl_access_log.1
-rw-r--r-- 1 root root 250 Dec 5 08:49 ssl_error_log.1
-rw-r--r-- 1 root root 35003 Dec 5 08:52 ssl_request_log.1