Solved

Apache not writing to log files

Posted on 2006-07-21
3
329 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
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 30 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Suggested Solutions

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

864 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

25 Experts available now in Live!

Get 1:1 Help Now