Need help emptying Apache access log

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Need help emptying Apache access log

Postby deck2deck » 08. March 2012 18:57

I am running XAMPP installed with the help of this website.

I'm not a programmer and really know nothing... I'm just able to follow instructions! I did get my site up and working and it has worked well now for over a year.

BUT I now have a new problem. I'm running out of disk space on my server! With a little investigation, I discovered that there is an Apache access log file that is 8GB big! That is why my site is running out of space.

I've searched online for nearly a week looking for an answer... I find many answers, but they are written for programmers and I have no idea how to begin (execute a script? run a cron job? I wouldn't even know where to start). :oops:

Can someone direct me to a step-by-step for fixing this problem? Thanks in advance!!
deck2deck
 
Posts: 12
Joined: 07. June 2011 16:09
Operating System: Windows Server 2008 R2, 6.1

Re: Need help emptying Apache access log

Postby WilliL » 08. March 2012 21:54

Are you meaning c:\\xampp\apache\logs\access-log?
which xampp version are you using?
Willi
WilliL
 
Posts: 661
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1

Re: Need help emptying Apache access log

Postby Sharley » 08. March 2012 23:13

@ deck2deck
Would you be so kind as to add your XAMPP version and Operating System to your profile as per these instructions and associated information:
viewtopic.php?f=16&t=48626
Thanks. :)

You simply delete the error.log and or the access.log file when Apache is stopped.

It will recreate them when you next start Apache.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Need help emptying Apache access log

Postby deck2deck » 09. March 2012 16:32

Thanks WilliL and Sharley!

WilliL: Yes -- that is the file I'm referencing.

Sharley: I thought I might be able to do that (delete the files) but I have not found ANYthing anywhere, on any of the forums I've been on, that has said so (and I've been searching for a week!) And without seeing that in print (that they would simply recreate themselves), I was afraid to do it.

Thanks SO much!!

Sharley, I updated my profile as requested -- thanks. For the record, I'm using XAMPP 1.7.4 on a Windows 2008 R2 server (version 6.1). Hope that helps, and I will try your suggestion. Appreciate your time!!
deck2deck
 
Posts: 12
Joined: 07. June 2011 16:09
Operating System: Windows Server 2008 R2, 6.1

Re: Need help emptying Apache access log

Postby Sharley » 09. March 2012 21:15

Thanks for fixing up your profile, it really does help us help you knowing those 2 important details.

And without seeing that in print (that they would simply recreate themselves), I was afraid to do it.
:shock: ...but you are seeing it in print in the only place that is official, the XAMPP Support Forums, anywhere else is not an official XAMPP response and should possibly be viewed with caution anyway, with the exception, of course, of the XAMPP's component web sites like Apache, MySQL and PHP etc.

If you are worried about Apache recreating those 2 log files automagically when you start Apache again and I can assure you Apache will, then alternatively you can simply delete all the file's content without deleting the actual file, but again you can only do this when Apache is stopped as Apache has the file(s) open when running so it can add any relevant messages in real time.

Best wishes. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Need help emptying Apache access log

Postby hackattack142 » 10. March 2012 00:13

A good place to usually start is the official documentation for a module. It would have also given you the information you were looking for (log rotate section) http://httpd.apache.org/docs/2.2/logs.html
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 703
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 63 guests