Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

OK, I've set up my Mac OS 10.8 2.2.24 Apache server, and it's serving well. Now I'm just trying to understand how to do log rotation. I'm using newsyslog, and it seems to work very well ... as in, I tell it to make a new access log file at 4am on Sunday, and roll the old one over to access_log.0. It does that. Shabang! BUT, my server keeps writing to the old one!! I have to stop, and then start Apache to tell it to wake up and start writing to the fresh access_log file.

That is, at 8am, Apache is blithely appending new log entries to access_log.0 when the new access_log file is sitting right there.

How do I rotate the log file AND automatically tell Apache to start writing to the fresh one???

This is a bit baffling, since you'd think that Apache would just write to whatever access_log file is there. But that's not what happens.

share|improve this question
    
Is newsyslog being run as root? –  w3d Mar 2 at 23:08
1  
When I enter "newsyslog" in terminal from a random non-root account, I am told "newsyslog: must have root privs". So I have to assume that it is being run as root when it is working. Newsyslog.conf is owned by root as is newsyslog.d and everything in it. –  user618 Mar 2 at 23:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.