Skip to content

Instantly share code, notes, and snippets.

@yunghoy
Last active February 8, 2017 19:31
Show Gist options
  • Select an option

  • Save yunghoy/a286d1c9c71e9f87b70b6f6d50285d27 to your computer and use it in GitHub Desktop.

Select an option

Save yunghoy/a286d1c9c71e9f87b70b6f6d50285d27 to your computer and use it in GitHub Desktop.
// haproxy
global
log /dev/log local0
listen http
log /dev/log local0
mode http
capture request header Referer len 128
capture request header User-Agent len 128
log-format |%si:%sp|%ci:%cp|%t|%ID|%s|%ST|%B|%Tt|\"%r\"|\"%hr\"|
// haproxy docker-compose
version: '2'
services:
haproxy:
image: haproxy
network_mode: host
volumes:
- "/home/nilath/haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg"
- "/dev/log:/dev/log"
// etc/syslog.conf
local0.* -/home/nilath/haproxy/gateway.log
// goaccess.conf
time-format %H:%M:%S
date-format %d/%b/%Y
log-format %^ %^ %^ %^ %^: |%^|%h:%^|%d:%t.%^|%e|%v|%s|%b|%L|"%r"|"{%R|%u}"|
// latest goaccess
echo "deb http://deb.goaccess.io/ $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/goaccess.list
wget -O - https://deb.goaccess.io/gnugpg.key | sudo apt-key add -
sudo apt-get update
apt-get download goaccess
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment