Skip to content

Instantly share code, notes, and snippets.

@garlandkr
Created March 7, 2013 20:41
Show Gist options
  • Select an option

  • Save garlandkr/5111621 to your computer and use it in GitHub Desktop.

Select an option

Save garlandkr/5111621 to your computer and use it in GitHub Desktop.
varnishncsa /etc/defaut/varnishncsa array
# NCSA log format, to be used by HTTP log analyzers
VARNISHNCSA_ENABLED=1
# JSON formatting for Daemon Options
DAEMON_OPTS[0]=-a
DAEMON_OPTS[1]=-w
DAEMON_OPTS[2]=/mnt/log/varnish/varnishncsa.log
DAEMON_OPTS[3]=-D
DAEMON_OPTS[4]=-F
DAEMON_OPTS[5]="{ \"remote_addr\": \"%h\",\"remote_user\": \"%u\",\"x_forwarded_for\": \"%{X-Forwarded-For}i\",\"hit_miss\": \"%{Varnish:hitmiss}x\",\"body_bytes_sent\": \"%b\",\"request_time\": \"%{Varnish:time_firstbyte}x\",\"status\": \"%s\",\"request\": \"%r\",\"host\": \"%{host}i\",\"request_method\": \"%m\",\"time_first_byte\": \"%{Varnish:time_firstbyte}x\",\"handling\": \"%{Varnish:handling}x\",\"http_referrer\": \"%{Referrer}i\",\"http_user_agent\": \"%{User-agent}i\"}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment