Solved

Apache not writing to log files

Posted on 2006-07-21
3
334 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to analyze web traffic logs 10 125
Website being blocked? 3 146
htaccess file 3 99
Clearing cache in word press. 3 73
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
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…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

751 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