How do I keep apache upgrades in Centos from creating logrotate.d\http files

Posted on 2011-10-06
Last Modified: 2012-05-12
We do not use logrotate for http apache.  So we took out the http file from logrotate.d   But everythime apache upgrades it puts it back.  I need it to stay gone, or not do anything if it is there.
Please help
Question by:jpjordan4
    LVL 21

    Accepted Solution

    The easiest way would be to just rm the file after upgrading Apache, as one generally does not update Apache that often, especially if they are using yum repos for that package.  You would just need to make sure that cron.daily doesn't run from the time you upgrade until you delete the file.

    You could setup a cron job to see if that file exists, and rm it if it does.

    You could remove the following line from /etc/logrotate.conf and replace it with filenames of the logs you do want to process, like
    include /etc/logrotate.d/named
    include /etc/logrotate.d/syslog

    Open in new window

    LVL 43

    Assisted Solution

    Do not remove /etc/logrotate.d/httpd - just clear or comment out its content. This way apache upgrades will rather create /etc/logrotate.d/httpd.rpmnew instead overwriting it.
    LVL 21

    Expert Comment

    Good catch ravenpl, it makes sense now that I think about it.  Will remember that one!

     tabooext [+] list
                  The  current  taboo  extension  list is changed (see the include directive for information on the taboo
                  extensions). If a + precedes the list of extensions, the current taboo  extension  list  is  augmented,
                  otherwise  it  is replaced. At startup, the taboo extension list contains .rpmorig, .rpmsave, ,v, .swp,
                  .rpmnew, ~, .cfsaved and .rhn-cfg-tmp-*.

    Open in new window

    LVL 21

    Expert Comment


    While my answers technically will work, ravenpl's is definitely the cleanest way to do it.

    Author Closing Comment

    Thank you for the quick response.  It seems that yum updates to apache do happen fairly frequently and I always manage to forget to remove the file on at least one server.  I think you guidance will help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
    1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now