New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

Logrotate not triggering

Started by Starburst, April 17, 2025, 08:57:19 PM

Previous topic - Next topic

Starburst

AlmaLinux 9.5
CWP 0.9.8.1201

Config is located at: /etc/logrotate.d/httpd
Quote/usr/local/apache/domlogs/*.log {
    missingok
    notifempty
    sharedscripts
    daily
    rotate 7
    postrotate
        /bin/systemctl reload httpd.service > /var/log/httpd-rotate.log 2>&1 || true
    endscript
    compress
}

But is not getting triggered automatically each night.
Trigger's manually without error.

When you check:
systemctl status logrotate
Quotelogrotate[811675]: error: failed to rename /usr/local/apache/domlogs/domain.com.log to /usr/local/apache/domlogs/domain.com.log-20250417: Read-only file
Only problem, is that file doesn't exit. Let alone be read only.

The other quirk is when you manually run it, it doesn't assign the date, just log.1.gz, log.2.gz, etc.