Proxy-set-header: Forwarding HTTP headers from Nginx to a WordPress container

I detailed in a recent post how I got a working WordPress container setup, complete with database and PHP engine. I saved the bit about how to redirect traffic to the container (and apply encryption to the outbound connections) because I knew it was going to be just as much work as getting the setup running. Also I needed to first get up to speed on HTTP headers in general and how to inspect them specifically.

This post is not a how-to any more than it’s a how-not-to. I wanted to detail as much the attempts that did not work as the final one that did because the former were just as illuminating as the latter.

tea shark

Inspecting HTTP headers with tshark

Redirecting traffic from an nginx reverse proxy to a docker container I needed to add some forwarding information to the http headers. And so I figured I had better start wrapping my head around what http headers actually were, how they looked and how my nginx settings were impacting them. Enter tshark, the command line version of Wireshark.

Wire-/tshark are general purpose packet analyzers so the challenge here is to avoid casting a too wide net: I don’t want all the network traffic on my host, just the http headers and just those coming in and out of one particular virtual box.