Score:0

NGINX proxy_pass: dump HTTPS requests as plaintext for debugging

eg flag

I saw this answer from 10 years ago that's more or less about the same thing, except it involves HTTP rather than HTTPS: nginx: dump HTTP requests for debugging

Is there a way to dump the encrypted traffic through NGINX proxy_pass as plaintext? I tried tcpdump/Wireshark on port 443 but all it gave me was jumbled encrypted text.

A bit of context, the upstream server is a remote HTTPS Apache server so the NGINX instance works as a CDN.

If this is not possible with NGINX, is there another proxy server software that allows for this? Is the proxied traffic (temporarily) stored in plaintext on system memory?

I know there is a security concern but this is on my own server and I just want to know if and how this can be done. I'm also in the process of developing an anti-DoS system that filters requests.

Lorem ipsum avatar
us flag
Yeah with tcp and wireshark you will need the key of your communication peer to do this. Do you only want to log all headers or all headers and the request body? You just need to specify your own log_format in nginx configuration and specify all variables you want to log. Do you really need the whole request or are you searching for some specific information?
djdomi avatar
za flag
just a question, why do you encrypt the traffic if you want to break it? I mean you own the ssl keys so there is always the traffic in your hands. you could also use the log formatand adjust your needs
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.