How to rotate logs in Apache using logrotate and rotatelogs ?

Solution Verified - Updated -

Issue

  • Different ways to rotate apache logs -- rotatelogs (built into apache) or logrotate (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)
    • 5
    • 6
  • Apache Web Server (httpd)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.