Re: [mod-security-users] rotatelogs on windows for SecAuditLogs - how to escape white spaces on path
Brought to you by:
victorhora,
zimmerletw
From: Raoni <ra...@uo...> - 2009-08-20 17:57:15
|
<p>Hi Brian, thanks for your help.<br /><br />but no. Didn't work either. Nothing in the log files. <br /><br />Running "httpd.exe -t" to check the syntax doesn't return anything. Doesn't return "Syntax OK" <br />as it should, but doesn't return any error messages (like the one saying that C:\Program isn't <br />recognized as a valid command). <br /><br />P.s.: If were to make installation decisions, I'd have installed it on Linux ;-) I'm just supporting it. <br /><br />Raoni.<br /><br /><br />Em 19/08/2009 21:01, Brian Rectanus < Bri...@br... > escreveu: <br /><br /><br />Raoni wrote: <br />> Hi, <br />> <br />> I'm using rotatelogs with a pipe like this on http.conf: <br />> <br />> CustomLog "|bin/rotatelogs -l logs/%Y-%m-%d-%H_%M_%S.access.log 86400" <br />> <br />> to rotate apache's error and access logs, but I can't get mod_security's <br />> SecAuditLog to work the same way. I'm not being able to escape white spaces <br />> ; properly. <br />> <br />> If I try to do the same, like this: <br />> SecAuditLog "|bin/rotatelogs -l logs/%Y-%m-%d-%H_%M_%S.modsec.log 86400" <br />> <br />> it complais about 'C:/Program' not being recognized as a executable. So I <br />> figure apache "tweaks" path names before passing them to mod_security, is it right? <br />> <br />> If I put it like this: <br />> SecAuditLog "|c:\rotatelogs -l logs/%Y-%m-%d-%H_%M_%S.modsec-erro.log 86400" <br />> <br />> and copy the rotatelogs.exe file to C:\, it works just fine. I've tried escaping <br />> the spaces with a backslash and inserting double quotes, but nothing seems to work. <br />> Obviously I don't want rotatelogs.exe to be on th root directory. <br />> <br />> These have been tried and didn't work: <br />> SecAuditLog "|C:\Program\ Files\Apache\ Software\ Foundation\Apache2.2\bin\rotatelogs... <br />> SecAuditLog "|C:\""Program Files""\""Apache Software Foundation" "\Apache2.2\bin\rotatelogs... <br />> <br />> Can someone tell me the right way to the escaping? <br /><br />Hmm. I don't have a Windows box handy right now, but maybe: <br /><br />SecAuditLog "|\"C:\\Program Files\\Apache Software <br />Foundation\\Apache2.2\\bin\\rotatelogs\" -l <br />logs/%Y-%m-%d-%H_%M_%S.modsec-error.log 86400" <br /><br />Or I think you can still use "/" instead of "\\". <br /><br />Normally I install in "C:\Apache" or "C:\ApacheHttpd" to avoid Windows <br />silly usage of spaces in paths ;) <br /><br />-B <br /><br />-- <br />Brian Rectanus <br />Breach Security <br /><br /><br /></p> |