Bug 47489 - enhance mod_rewrite and RewriteLog directive to support Windows UNC path
Summary: enhance mod_rewrite and RewriteLog directive to support Windows UNC path
Status: RESOLVED WONTFIX
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_rewrite (show other bugs)
Version: 2.2.11
Hardware: PC Windows Server 2003
: P2 normal with 4 votes (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2009-07-07 12:04 UTC by todd_643
Modified: 2011-09-17 17:32 UTC (History)
1 user (show)



Attachments
proposed patch file (574 bytes, text/plain)
2009-07-16 15:30 UTC, todd_643
Details

Note You need to log in before you can comment on or make changes to this bug.
Description todd_643 2009-07-07 12:04:27 UTC
Please add support for logging via RewriteLog directive to log files that reside on a network share, addressed using UNC URI

ErrorLog and CustomLog directive already support UNC paths
Comment 1 todd_643 2009-07-16 15:30:39 UTC
Created attachment 23998 [details]
proposed patch file

I made a small change to mod_rewrite.c to not pre-pend the server root to the log file.

Did a quick test with the following RewriteLog directive in Win2K3.
Everything seems to work as expected.  The rewrite.log file is now written to a remote share via UNC Path

RewriteLog "|bin/rotatelogs.exe -l -f //corpserver/app/ApacheLogsTest/rewrite.log 43200"

Please comment & provide guidance on the proposed fix regarding
1. correctness
2. portability

Thanks
Comment 2 Robert Christian 2009-09-08 10:54:16 UTC
PCI requirements state that log files for web-facing servers (in the DMZ) should reside in the internal network to avoid tampering and better control visibility.  One way to implement this is to provide a UNC path as a parameter to rotatelogs.exe in the *Log directives.  This works for the ErrorLog and CustomLog directives, but not RewriteLog.  I believe this should be considered a bug and not an enhancement.
Comment 3 Stefan Fritsch 2010-06-06 14:54:22 UTC
In trunk this is no longer an issue, because mod_rewrite now uses the normal error log (at trace* log level).
Comment 4 Eric Covener 2011-09-17 17:32:24 UTC
no longer in trunk as its own logfile, won't fix in 2.2