Created
August 21, 2019 11:52
-
-
Save rodde177/eeffdd3322ad9ed46033e33c9d100a39 to your computer and use it in GitHub Desktop.
NGINX logging
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
log_format main '$http_x_forwarded_for - $remote_user [$time_local] ' | |
'"$request" $status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent"' ; | |
log_format json_combined escape=json | |
'{' | |
'"time_local":"$time_local",' | |
'"remote_addr":"$http_x_forwarded_for",' | |
'"remote_user":"$remote_user",' | |
'"request":"$request",' | |
'"status": "$status",' | |
'"host": "$http_host",' | |
'"body_bytes_sent":"$body_bytes_sent",' | |
'"request_time":"$request_time",' | |
'"http_referrer":"$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