< Previous Page Return to Title Page Next Page >

Piped logging in Apache: Configuration examples

     
  • Messages can be piped to a log monitor as follows:

  •  
    # Piped logs can be used for log rotation as well as monitoring
    CustomLog "|rotatelogs /var/log/www_log 86400" combined
    ErrorLog "|rotatelogs /var/log/www_errors 86400"
    # Apache can maintain more than one access log, so you can feed
    # access information to a monitor and also to a log file
    CustomLog "|/usr/local/bin/perl /usr/local/bin/webmon.pl" combined
    # Piping error log messages to a monitor is especially useful
    # when one wants to detect abuse and/or attacks. Alas, there can
    # only be one error log, so you must either rely on access logs
    # for error information (usually an acceptable solution) or 
    # design your monitor to "tee" the messages to a file for you.
    ErrorLog "|/usr/local/bin/snobol4 -b /usr/local/bin/wormwatch.sno"