Skip to content

Instantly share code, notes, and snippets.

@vjt
Created February 22, 2012 15:32
Show Gist options
  • Save vjt/1885569 to your computer and use it in GitHub Desktop.
Save vjt/1885569 to your computer and use it in GitHub Desktop.

Revisions

  1. vjt revised this gist Feb 22, 2012. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions conf.apache
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,9 @@
    # Based on conf.proftpd by Pavol Domin
    # Crafted by Marcello Barnaba <[email protected]>

    # Get GRC at http://kassiopeia.juls.savba.sk/~garabik/software/grc.html
    #

    # ip number
    regexp=^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}
    colours=bold magenta
  2. vjt created this gist Feb 22, 2012.
    43 changes: 43 additions & 0 deletions conf.apache
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,43 @@
    # Configuration suitable to display Apache/nginx access logs
    # Based on conf.proftpd by Pavol Domin
    # Crafted by Marcello Barnaba <[email protected]>

    # ip number
    regexp=^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}
    colours=bold magenta
    count=once
    -
    # everything in brackets
    regexp=\[.+?\]
    colours=cyan
    count=once
    -
    # everything in ""
    regexp=\".+?\"
    colours=blue
    count=more
    -
    # HTTP Method
    regexp=(?:HEAD|GET|POST|PUT|DELETE)
    colours=bold blue
    count=once
    -
    # HTTP Path
    regexp=\s/[^\s]+
    colours=bold green
    count=once
    -
    # HTTP OK Status codes - from http://httpcats.herokuapp.com/ ;-)
    regexp=\s(?:10[01]|20[02467]|30[0123457])
    colours=green
    count=once
    -
    # HTTP Error status code - from the same source as above
    regexp=\s(?:40[1-9]|41[1-8]|42[2-9]|431|444|450|50[2-9]|599)
    colours=bold red
    count=once
    -
    # Request byte size
    regexp=\s(?!(?:10[01]|20[02467]|30[0123457])|(?:40[1-9]|41[1-8]|42[2-9]|431|444|450|50[2-9]|599))\d+
    colours=yellow
    count=once