Piped Log Support for lighttpd

lighttpd (http://www.lighttpd.net/) does not support writing the error log to a pipe without a patch, but it does support it for the access log out of the box.

This problem is easily solved with a cronjob that rotates the log periodically, and using a different logging system for your fastcgi applications so that they have their own logs.

However, if you do want this feature, patches are available in this ticket: http://redmine.lighttpd.net/issues/296 .

The patch for version 1.4.x is here: http://redmine.lighttpd.net/attachments/download/86/log-cronolog2.diff .

The patch for version 1.5 (svn trunk) is here: http://redmine.lighttpd.net/attachments/download/725/log-cronolog3.diff .

I also have a patch for 1.5 that combines the above patch with some code that removes the tracing prefix from fastcgi stderr, which I found extremely annoying. You can find it here: http://www.cachemiss.com/patches/piped_log_and_no_fastcgi_tracing_for_lighttpd_1_5.patch .

An alternative for removing fastcgi tracing prefixes is described by hobbs here for Apache: http://cleverdomain.org/blog/articles/Removing%20FastCGI%27s%20Crap%20from%20error.log.markdown which you can use with just the piped log patch.

Last modified: 2017-1-8 (日) at 9:14 pm