Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have Virtual Hosts set up so that each VH has its own set of logs for access and errors. For some reason, these stop logging and returns to the default server logs randomly after logrotate kicks in but not always. Restarting the server resumes regular logging.

The new log files created by logrotate always have the web server as owner with rw access so I can't figure out why.

This is happening in both Apache and Nginx servers.

The options set for the log in the logrotate scripts are:

daily
rotate 7
compress
create 670 www-data admin
share|improve this question

closed as unclear what you're asking by Jenny D, Ward, Katherine Villyard, TheCleaner, mdpc Feb 11 at 20:53

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

    
possible duplicate of apache httpd restarts every 24 hours –  Jenny D Feb 10 at 12:13
1  
create 670?! That's certainly an error. –  Michael Hampton Feb 10 at 12:36
    
That's the kind of examples I'm seeing from here: thegeekstuff.com/2010/07/logrotate-examples. What part of it is wrong? =/ –  Ken Feb 10 at 13:18
1  
I've never seen a case where it is appropriate that the logs be made executable. –  Petter H Feb 10 at 16:53

1 Answer 1

Do you have a postrotate clause? It's important after rotation the server is told to "reload" so it creates new log files. Here's an example:

postrotate
  /etc/init.d/apache2 reload > /dev/null
endscript
share|improve this answer
    
Well, I just checked the logs after logrotate ran but these settings don't seem to help. The logging still stops. Is there any way to debug why this is happening? –  Ken Feb 11 at 0:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.