Skip to content

Instantly share code, notes, and snippets.

@jdunck
Created January 28, 2016 23:04
Show Gist options
  • Select an option

  • Save jdunck/d9fd79e2627ea972cfa7 to your computer and use it in GitHub Desktop.

Select an option

Save jdunck/d9fd79e2627ea972cfa7 to your computer and use it in GitHub Desktop.

Revisions

  1. jdunck created this gist Jan 28, 2016.
    8 changes: 8 additions & 0 deletions nginx body logging
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    In nginx.conf, in the Logging Settings section:

    log_format replay '[$time_local] $server_name $status $content_type $request_method XX_HOST_XX$request_uri Authorization:"$http_authorization" $request_body_file';

    In specific server/location's config:

    client_body_in_file_only on;
    access_log /var/log/nginx/whatever-replay.log replay;