-1

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
Ken
  • 109
  • 2

1 Answers1

3

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
Rudu
  • 301
  • 1
  • 5
  • 8
  • 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 '14 at 00:33