You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Martijn Balink <bn...@hesasd.nl> on 2002/07/16 16:28:43 UTC

Locked Log-files

Hi,

I've got a quastion about Apache for Windows. I'm currently running
Windows 2000 server, SP1, with Apache 1.3.26. Because the log-files (and
especcially access.log) are growing fast I want to rotate them. I've
written a simple VBS-script, that renames the access.log-file to
<currentdate>.log, and removes the logfile from a month ago. 
My only problem is: I can't rename the log-file. It appears to remain
open, even though I've stopped the apache-service (I'm running apache as
a startup-service).
I've tried stopping the service in several ways: From the
"services"-windows, from the command prompt by issuing the "net stop
apache" -command, and from the dos-prompt, by typing "apache -n apache
-k shutdown" and "apache -n apache -k stop", but nothing seems to work,
the log-file remains open. When I try to rename them by hand (not
through the script), I get an "access denied or file in use"-error. I do
have al the NTFS-permissions I need.
The FAQ's on the apache site tell about log-rotation, but the tools and
command-line based options in those sections only aply to the
UNIX-platforms.

Does anyone have a clue?

Thanks in advance,

Martijn Balink
Network Administrator
Amsterdam School of Business
The Netherlands

P.S. I'm not sure if this has anything to do with it, but I'm using
Apache to host a WebCt-server, and the WebCt installation-procedure does
quite a lot with the Apache-software. My Apache.exe (and thus the
Apache-service) no longer start from their usual location, but from a
location in the WebCt-folder. 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Locked Log-files

Posted by jlwpc1 <jl...@earthlink.net>.
 
:: I've got a quastion about Apache for Windows. 

:: I've written a simple VBS-script, 

:: I've tried stopping the service in several ways

Below are a bunch of VBScript files:

Online The System Administration Scripting Guide
http://www.microsoft.com/technet/scriptcenter/sampscr.asp

Use them to easily write a "complete" 
Apache admin "control system", 
based on your own needs.   :)

JLW




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: Locked Log-files

Posted by Martijn Balink <bn...@hesasd.nl>.
Hmm, I don't know *what* went wrong, but after a reboot everything was
back to normal again, and the logfile could be renamed like it was
supposed to.
Weird, but my problem is solved, and that's what it's all about, right?
;-)

Martijn.

-----Original Message-----
From: Martijn Balink [mailto:bnk@hesasd.nl] 
Sent: dinsdag 16 juli 2002 16:29
To: users@httpd.apache.org
Subject: Locked Log-files 


Hi,

I've got a quastion about Apache for Windows. I'm currently running
Windows 2000 server, SP1, with Apache 1.3.26. Because the log-files (and
especcially access.log) are growing fast I want to rotate them. I've
written a simple VBS-script, that renames the access.log-file to
<currentdate>.log, and removes the logfile from a month ago. 
My only problem is: I can't rename the log-file. It appears to remain
open, even though I've stopped the apache-service (I'm running apache as
a startup-service). I've tried stopping the service in several ways:
>From the "services"-windows, from the command prompt by issuing the "net
stop apache" -command, and from the dos-prompt, by typing "apache -n
apache -k shutdown" and "apache -n apache -k stop", but nothing seems to
work, the log-file remains open. When I try to rename them by hand (not
through the script), I get an "access denied or file in use"-error. I do
have al the NTFS-permissions I need. The FAQ's on the apache site tell
about log-rotation, but the tools and command-line based options in
those sections only aply to the UNIX-platforms.

Does anyone have a clue?

Thanks in advance,

Martijn Balink
Network Administrator
Amsterdam School of Business
The Netherlands

P.S. I'm not sure if this has anything to do with it, but I'm using
Apache to host a WebCt-server, and the WebCt installation-procedure does
quite a lot with the Apache-software. My Apache.exe (and thus the
Apache-service) no longer start from their usual location, but from a
location in the WebCt-folder. 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org