FOK!forum / Digital Corner / apache logrotate onder windows
mscholvrijdag 10 februari 2006 @ 00:01
ik heb onder win2003 een apache server draaien
nou zit bij deze release ook een logrotate.exe
ik wil dus , om de logs (access log is momenteel al 127MB, dit vind ik wat te rigoreus om te openen en even te kijken naar hotlinks e.d.) in een handzaam formaat te houden, een logrotate uitvoeren (elke week bijvoorbeeld)
maar om de een of andere reden krijg ik het niet aan de praat...
iemand hier ervaringen mee?
SuperrrTuxxxvrijdag 10 februari 2006 @ 01:24
Ik vond dit. Hier heet het rotatelogs.exe, maar het zal ws wel op dezelfde manier gaan als je de bestandsnaam verandert.
quote:
How to setup rotating logs with "Rotatelogs" under Windows
When you setup the rotating of logs under windows with Apache, make sure that you have to "Rotatelogs.exe" in your "Bin"-Directory of your webserver.

Then, exit the httpd.conf according to the manual of apache. The major change that you have to do is the paths to the logfiles and the .exe:

CustomLog "|w:/server/apache2/bin/rotatelogs.exe W:/home/tokyo/weblogs/tokyoahead.local.%Y-%m-%d-%H_%M_%S.log 86400 120" combined

Also make sure that you put this in the correct environment. If you have virtual hosts, it has to be saved there, NOT in the common logfile definition!
mscholvrijdag 10 februari 2006 @ 09:40
quote:
Op vrijdag 10 februari 2006 01:24 schreef SuperrrTuxxx het volgende:
Ik vond dit. Hier heet het rotatelogs.exe, maar het zal ws wel op dezelfde manier gaan als je de bestandsnaam verandert.
[..]

hmm als ik dat doe wordt niks meer gelogd in me access.log

als volgt:
voor aanpassing:
CustomLog c:/Logs/apache/access.log combined

na aanpassing CustomLog "|d:/apache/bin/rotatelogs.exe c:/Logs/apache/access.%Y-%m-%d-%H_%M_%S.log 86400 120" combined


wat zou ik verkeerd kunnen doen?

--edit-- laay maar
ik dac ht dat ik me exe had gerenamed maar toch nniet nu doettie ut wel..
Thanks

(apache is nu ook stukke sneller )

[ Bericht 20% gewijzigd door mschol op 10-02-2006 09:47:26 ]
SuperrrTuxxxvrijdag 10 februari 2006 @ 11:56