Solved

Apache not writing to log files

Posted on 2006-07-21
3
328 Views
Last Modified: 2008-03-17
Hullo, I have a server hosting five or so websites.

Each site logs to it's own log files.

I have created a custom log to record traffic types.

Four of the five sites are logging traffic without difficulty. One isn't.

Is there a method whereby I can "invalidate" all the log files, delete them and "force" Apache to create new log files?

I'm wondering if my moving the files around between servers (from dev to live) has caused problems, as I've created text files and name them access.log....

It's not massively urgent, but something I'd like to have as a sort of script that could run every 30 days or so.

Many thanks,
Nick
0
Comment
Question by:nickkirby
3 Comments
 
LVL 13

Accepted Solution

by:
rhickmott earned 95 total points
Comment Utility
If you stop the Apache Service and delete the log files upon startup Apache should if I recall rightly recreate the files.

I had a simlar problem a while back where a[ache for some reason just stopped logging for a period of 7 days for just complete randomness I think it was having a permission problem with the log file.
0
 
LVL 15

Assisted Solution

by:periwinkle
periwinkle earned 30 total points
Comment Utility
I agree with rhickmott - the most common reason for Apache to stop writing to a file is because of file permissions.  Stopping Apache, deleting the file, and restarting apache should recreate;  if it doesn't, look into the error_log to find out why.
0
 

Author Comment

by:nickkirby
Comment Utility
Well, I've deleted the files and lo, apache recreated them.

Cheers,
Nick
0

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!

Join & Write a Comment

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
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.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

743 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

9 Experts available now in Live!

Get 1:1 Help Now