Skip to content

Instantly share code, notes, and snippets.

@i-sync
Created March 16, 2023 10:31
Show Gist options
  • Save i-sync/0dcd6a5d8af3117bd313aadb488973f5 to your computer and use it in GitHub Desktop.
Save i-sync/0dcd6a5d8af3117bd313aadb488973f5 to your computer and use it in GitHub Desktop.
nginx log format show full request url
####
# URL: https://stackoverflow.com/a/37877244
####
log_format main '$http_x_forwarded_for - $remote_user [$time_local] '
'"$request_method $scheme://$host$request_uri $server_protocol" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $request_time';
##
# Logging Settings
##
#access_log /var/log/nginx/access.log;
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment