5

I'm running WAMP server on Windows Server 2003, Apache 2.2, and I would like to completely disable writing into the access log.

It would be neat if I could do the following, but I'm on Windows:

CustomLog "|/dev/null" common

All I get in the error log is "piped log program '/dev/null' failed unexpectedly", although I kinda expected this...

Is there a Windows alternative to this or any other way to just disable writing the access log?

  • 6
    Isn't it enough to just comment this line? – Khaled Jun 4 '12 at 9:36
  • How about CustomLog "|NUL" common – Alan Kuras Jun 4 '12 at 13:09
  • When commenting out the line in a virtual host's .conf file, be sure to also comment out the line in the main/root httpd.conf. – Uwe Keim May 18 '18 at 9:41
5

If you don't specify a log, Apache will not log... just comment out the line.

Piping it to the bit bucket is a bit of a waste, Apache will generate all log entries and write them all out, but the OS dumps them. Would make much more sense to just disable logging.

The Error log can be disabled with ErrorLog off too.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.