-
-
Save hernandesbsousa/35c4d3bbd83ba4bc6162 to your computer and use it in GitHub Desktop.
Nginx logging in JSON format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /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