3 ms·
That’s news to me. I’ve been managing Apache hosts for well over a decade and never had an issue. Used apache 1.3, 2.2 and 2.4. What’s your log rotation code l
by pushpop 7y ago
That’s news to me. I’ve been managing Apache hosts for well over a decade and never had an issue. Used apache 1.3, 2.2 and 2.4.
What’s your log rotation code look like?
- toast0 7y agoYou have to do a graceful restart after rotation, according to the docs, which then leads to scripts that try a couple times and then reboot. (It's been a while, but I did have an install where graceful restart would work once, but consistently fail on the second rotation). https://httpd.apache.org/docs/2.4/logs.html#rotation https://httpd.apache.org/docs/2.4/logs.html#rotation
- pushpop 7y agoIf you don’t change the inode then no restart should be required. There’s definitely a few tools out there that solve this problem without needing to restart httpd.
- toast0 7y agoHow do you rotate without changing the inode?
- pushpop 7y agoSorry, my previous comment was really unhelpful. What I meant was you should be using pipes and apaches own log rotate code. Read the “Logging Using Pipes” section at the very end. https://www.digitalocean.com/community/tutorials/how-to-configure-logging-and-log-rotation-in-apache-on-an-ubuntu-vps https://www.digitalocean.com/community/tutorials/how-to-conf... (Excuse the DO link, it was just the first result in Duck Duck Go. There’s nothing specific about DO or Ubuntu in this approach) I’ve used this method on large clusters of very heavily utilised web servers and it works great. No restarts required.