How to rotate logs in Apache HTTPD using logrotate and rotatelogs ?
Issue
- Different ways to rotate apache logs --
rotatelogs
(built into apache) orlogrotate
(linux). Which method to use? - Does
logrotate
stop Apache or cause any issues to end users? - How to rotate
access.log
using size based? - How to achieve access log rotation?
- How to autorotate EWS logs?
Environment
- Red Hat Enterprise Linux (RHEL)
- 7.x,8.x,9.x
- Red Hat Software Collections (RHSCL)
- httpd-2.4.x
- Red Hat JBoss Core Services (JBCS) Apache httpd
- 2.4
- Apache Web Server (httpd)
- 2.2.x
- 2.4.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.