Friday, January 26, 2007


Apache Log Download

I have been having trouble downloading the Apache access.log via ftp since Apache owns the file and keeps it open. I would have to log into the server, copy the file and then ftp the copy.

But since Apache owns the file, it can read it anytime. So I added the following code to the alias section of httpd.conf:
    Alias /logs/ "C:/Program Files/Apache Group/Apache/logs/"

<Directory "C:/Program Files/Apache Group/Apache/logs/">
Options Indexes
AuthName "Members Only"
AuthType Basic
AuthUserFile "C:/Program Files/Apache Group/Apache/.htpasswd"
Require valid-user
And created .htpasswd using the htpasswd program.

This gives me password protected access to all my log files at http://hostname/logs/.

keywords: windows apache server access.log

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?