On 24/11/2022 12:13 pm, Eric Covener wrote:
Should I adjust /etc/logrotate.d/apache2 to restart instead of reload?How many entries for Apache logs are there, and how frequently do they rotate in logrotated?
There are three Apache website logs and they rotate daily. Here is the script
# /etc/logrotate.d/apache2 /var/log/apache2/*.log { daily missingok rotate 14 compress delaycompress notifempty create 0660 root adm sharedscripts prerotate if [ -d /etc/logrotate.d/httpd-prerotate ]; then run-parts /etc/logrotate.d/httpd-prerotate fi endscript postrotate if pgrep -f ^/usr/sbin/apache2 > /dev/null; then invoke-rc.d apache2 reload 2>&1 | logger -t apache2.logrotate fi endscript } # /etc/cron.daily/apache2 #!/bin/sh # run htcacheclean if set to 'cron' mode set -e set -u type htcacheclean > /dev/null 2>&1 || exit 0 [ -e /etc/default/apache-htcacheclean ] || exit 0 # edit /etc/default/apache-htcacheclean to change this HTCACHECLEAN_MODE=daemon HTCACHECLEAN_RUN=auto HTCACHECLEAN_SIZE=300M HTCACHECLEAN_PATH=/var/cache/apache2/mod_cache_disk HTCACHECLEAN_OPTIONS="" . /etc/default/apache-htcacheclean [ "$HTCACHECLEAN_MODE" = "cron" ] || exit 0 htcacheclean ${HTCACHECLEAN_OPTIONS} \ -p${HTCACHECLEAN_PATH} \ -l${HTCACHECLEAN_SIZE}
I think there's a trick to batch them if there's very many. But it sounds like it's constantly doing rotation. --------------------------------------------------------------------- To unsubscribe, e-mail:users-unsubscr...@httpd.apache.org For additional commands, e-mail:users-h...@httpd.apache.org
-- Signed email is an absolute defence against phishing. This email has been signed with my private key. If you import my public key you can automatically decrypt my signature and be sure it came from me. Just ask and I'll send it to you. Your email software can handle signing.
OpenPGP_signature
Description: OpenPGP digital signature