homepage Welcome to WebmasterWorld Guest from 54.211.201.65
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Clearing apache log files
How?
dhdweb




msg:1521098
 12:23 am on Dec 14, 2002 (gmt 0)

I am running Apache as a test server on Win98se.
I run it in the console mode.

Just deleting the access and error files doesn't work, they get replaced with a file of the same size with a bunch of junk in it!

The manual shows this code for rotating the logs:

mv access_log access_log.old
mv error_log error_log.old
apachectl graceful
sleep 600
gzip access_log.old error_log.old

But I can't find out where to put this code.
Anyone have a clue on this?

 

DaveAtIFG




msg:1521099
 1:06 am on Dec 14, 2002 (gmt 0)

This is a series of commands that you would use on a *nix/Apache installation. For example, "mv" moves a file. These could all be put into a script file and run as a batch as needed.

You could probably "translate" these into similar Windoze commands and build a batch file.

dhdweb




msg:1521100
 1:22 am on Dec 14, 2002 (gmt 0)

Stupid me!

I was trying to clear the logs without shuting down Apache first!

I now hang my head in shame :(

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved