Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 578 Bytes

README.md

File metadata and controls

26 lines (17 loc) · 578 Bytes

nginx2goaccess

Convert Nginx log_format to goaccess config.

Usage

Command:

Usage: ./nginx2goaccess.sh '<log_format>'

./nginx2goaccess.sh '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"'

Result:

  • Can be used with -p and read from a config file or placed into ~/.goaccessrc
- Generated goaccess config:

time-format %T
date-format %d/%b/%Y
log_format %h - %^ [%d:%t %^] "%r" %s %b "%R" "%u"