Nginx Capture Request Headers

Ken J asked:

I’m testing out a CDN with my site. I’m running Centos 7 with Nginx 1.14.0. I’ve added the following lines in my Nginx server config:

server {
    client_body_temp_path      /tmp/nginx-files/;
    client_body_in_file_only   on;
    client_body_buffer_size    5M;
    client_max_body_size       7G;

My problem is that there are no files being generated in /tmp/nginx-files. I’ve tested this out in real-time while making requests to my site.
I just need to confirm the headers that are being sent from CloudFront to my server.

How do I catch the headers that are being sent to Nginx in an HTTP Request?

My answer:

Use tcpdump or some other packet capture tool?

The client_body_ directives only apply to request bodies, not request headers.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.