Solved

Apache not writing to log files

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

785 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