Skip to content

Instantly share code, notes, and snippets.

@strootman
Forked from aaronfeng/etc-nginx-nginx.conf
Created April 18, 2017 22:40
Show Gist options
  • Save strootman/82b1a86b5d5471b66573c9808ade0ed0 to your computer and use it in GitHub Desktop.
Save strootman/82b1a86b5d5471b66573c9808ade0ed0 to your computer and use it in GitHub Desktop.
nginx json log format
# /etc/nginx/nginx.conf
log_format main '{'
'"remote_addr": "$remote_addr",'
'"remote_user": "$remote_user",'
'"time_local": "$time_local",'
'"request": "$request",'
'"status": "$status",'
'"body_bytes_sent": "$body_bytes_sent",'
'"http_referer": "$http_referer",'
'"http_user_agent": "$http_user_agent"'
'}';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment