Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Apache not writing to log files

Posted on 2006-07-21
3
Medium Priority
?
337 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 285 total points
ID: 17154756
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 90 total points
ID: 17154953
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
ID: 17155156
Well, I've deleted the files and lo, apache recreated them.

Cheers,
Nick
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
Integration Management Part 2
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month6 days, 4 hours left to enroll

772 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